summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-11-15 12:04:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-11-15 12:04:54 +0900
commitd53c55ecb512be114b394955da22e2450d01e379 (patch)
tree10fd5da883c1617233670a771c453d9561dd2401
parentAdd description (diff)
downloadmisskey-d53c55ecb512be114b394955da22e2450d01e379.tar.gz
misskey-d53c55ecb512be114b394955da22e2450d01e379.tar.bz2
misskey-d53c55ecb512be114b394955da22e2450d01e379.zip
wip: clip
Diffstat (limited to '')
-rw-r--r--locales/ja-JP.yml3
-rw-r--r--migration/1605408848373-clip-description.ts15
-rw-r--r--migration/1605408971051-comments.ts434
-rw-r--r--src/client/components/form-dialog.vue10
-rw-r--r--src/client/components/note.vue44
-rw-r--r--src/client/pages/my-antennas/index.vue2
-rw-r--r--src/client/pages/my-clips/index.vue78
-rw-r--r--src/client/pages/test.vue8
-rw-r--r--src/client/router.ts1
-rw-r--r--src/client/sidebar.ts8
-rw-r--r--src/models/entities/clip.ts6
-rw-r--r--src/models/repositories/clip.ts6
-rw-r--r--src/server/api/endpoints/clips/add-note.ts76
-rw-r--r--src/server/api/endpoints/clips/create.ts10
-rw-r--r--src/server/api/endpoints/clips/notes.ts9
15 files changed, 699 insertions, 11 deletions
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 1f6a06e3ab..ff39eec153 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -605,6 +605,9 @@ random: "ランダム"
system: "システム"
switchUi: "UI切り替え"
desktop: "デスクトップ"
+clip: "クリップ"
+createNew: "新規作成"
+optional: "任意"
_mfm:
cheatSheet: "MFMチートシート"
diff --git a/migration/1605408848373-clip-description.ts b/migration/1605408848373-clip-description.ts
new file mode 100644
index 0000000000..b352173e4c
--- /dev/null
+++ b/migration/1605408848373-clip-description.ts
@@ -0,0 +1,15 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class clipDescription1605408848373 implements MigrationInterface {
+ name = 'clipDescription1605408848373'
+
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`ALTER TABLE "clip" ADD "description" character varying(2048) DEFAULT null`);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+
+ await queryRunner.query(`ALTER TABLE "clip" DROP COLUMN "description"`);
+ }
+
+}
diff --git a/migration/1605408971051-comments.ts b/migration/1605408971051-comments.ts
new file mode 100644
index 0000000000..c69ae29a9b
--- /dev/null
+++ b/migration/1605408971051-comments.ts
@@ -0,0 +1,434 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class comments1605408971051 implements MigrationInterface {
+ name = 'comments1605408971051'
+
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`COMMENT ON COLUMN "log"."createdAt" IS 'The created date of the Log.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."createdAt" IS 'The created date of the DriveFolder.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."name" IS 'The name of the DriveFolder.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."parentId" IS 'The parent folder ID. If null, it means the DriveFolder is located in root.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."createdAt" IS 'The created date of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userHost" IS 'The host of owner. It will be null if the user in local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."md5" IS 'The MD5 hash of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."name" IS 'The file name of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."type" IS 'The content type (MIME) of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."size" IS 'The file size (bytes) of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."comment" IS 'The comment of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."blurhash" IS 'The BlurHash string.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."properties" IS 'The any properties of the DriveFile. For example, it includes image width/height.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS 'The URL of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."thumbnailUrl" IS 'The URL of the thumbnail of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."webpublicUrl" IS 'The URL of the webpublic of the DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS 'The URI of the DriveFile. it will be null when the DriveFile is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."folderId" IS 'The parent folder ID. If null, it means the DriveFile is located in root.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isSensitive" IS 'Whether the DriveFile is NSFW.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isLink" IS 'Whether the DriveFile is direct link to remote server.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."createdAt" IS 'The created date of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."updatedAt" IS 'The updated date of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."username" IS 'The username of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."usernameLower" IS 'The username (lowercased) of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."name" IS 'The name of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."followersCount" IS 'The count of followers.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."followingCount" IS 'The count of following.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."notesCount" IS 'The count of notes.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."avatarId" IS 'The ID of avatar DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."bannerId" IS 'The ID of banner DriveFile.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isSuspended" IS 'Whether the User is suspended.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isSilenced" IS 'Whether the User is silenced.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isLocked" IS 'Whether the User is locked.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isBot" IS 'Whether the User is a bot.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isCat" IS 'Whether the User is a cat.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isAdmin" IS 'Whether the User is the admin.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isModerator" IS 'Whether the User is a moderator.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."host" IS 'The host of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."inbox" IS 'The inbox URL of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."sharedInbox" IS 'The sharedInbox URL of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."featured" IS 'The featured URL of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."uri" IS 'The URI of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."token" IS 'The native access token of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."createdAt" IS 'The created date of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."secret" IS 'The secret key of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."name" IS 'The name of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."description" IS 'The description of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."permission" IS 'The permission of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."callbackUrl" IS 'The callbackUrl of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."createdAt" IS 'The created date of the AccessToken.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."lastUsedAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."session" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."appId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."iconUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."createdAt" IS 'The created date of the Channel.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."name" IS 'The name of the Channel.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."description" IS 'The description of the Channel.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."bannerId" IS 'The ID of banner Channel.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."notesCount" IS 'The count of notes.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."usersCount" IS 'The count of users.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."createdAt" IS 'The created date of the Note.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."replyId" IS 'The ID of reply target.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."renoteId" IS 'The ID of renote target.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."userId" IS 'The ID of author.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."uri" IS 'The URI of a note. it will be null when the note is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."url" IS 'The human readable url of a note. it will be null when the note is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."channelId" IS 'The ID of source channel.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."userHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll_vote"."createdAt" IS 'The created date of the PollVote.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_reaction"."createdAt" IS 'The created date of the NoteReaction.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."createdAt" IS 'The created date of the NoteWatching.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."userId" IS 'The watcher ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteId" IS 'The target Note ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteUserId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteUserId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteChannelId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."createdAt" IS 'The created date of the FollowRequest.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeId" IS 'The followee user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerId" IS 'The follower user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."requestId" IS 'id of Follow Activity.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerSharedInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeSharedInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group"."createdAt" IS 'The created date of the UserGroup.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group"."userId" IS 'The ID of owner.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."createdAt" IS 'The created date of the UserGroupInvitation.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userId" IS 'The user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userGroupId" IS 'The group ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "notification"."createdAt" IS 'The created date of the Notification.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "notification"."notifieeId" IS 'The ID of recipient user of the Notification.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "notification"."isRead" IS 'Whether the Notification is read.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "meta"."localDriveCapacityMb" IS 'Drive capacity of a local user (MB)'`);
+ await queryRunner.query(`COMMENT ON COLUMN "meta"."remoteDriveCapacityMb" IS 'Drive capacity of a remote user (MB)'`);
+ await queryRunner.query(`COMMENT ON COLUMN "meta"."maxNoteTextLength" IS 'Max allowed note text length in characters'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."createdAt" IS 'The created date of the Following.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeId" IS 'The followee user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerId" IS 'The follower user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerSharedInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeSharedInbox" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."caughtAt" IS 'The caught date of the Instance.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."host" IS 'The host of the Instance.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."usersCount" IS 'The count of the users of the Instance.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."notesCount" IS 'The count of the notes of the Instance.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareName" IS 'The software of the Instance.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareVersion" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."openRegistrations" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerName" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerEmail" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."iconUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."faviconUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."themeColor" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muting"."createdAt" IS 'The created date of the Muting.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "muting"."muteeId" IS 'The mutee user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "muting"."muterId" IS 'The muter user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "blocking"."createdAt" IS 'The created date of the Blocking.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockeeId" IS 'The blockee user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockerId" IS 'The blocker user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list"."createdAt" IS 'The created date of the UserList.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list"."name" IS 'The name of the UserList.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."createdAt" IS 'The created date of the UserListJoining.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userId" IS 'The user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userListId" IS 'The list ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."createdAt" IS 'The created date of the UserGroupJoining.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userId" IS 'The user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userGroupId" IS 'The group ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_favorite"."createdAt" IS 'The created date of the NoteFavorite.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."createdAt" IS 'The created date of the AbuseUserReport.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."targetUserHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."reporterHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."createdAt" IS 'The created date of the MessagingMessage.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."userId" IS 'The sender user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."groupId" IS 'The recipient group ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "signin"."createdAt" IS 'The created date of the Signin.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "auth_session"."createdAt" IS 'The created date of the AuthSession.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."createdAt" IS 'The created date of the ReversiGame.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."startedAt" IS 'The started date of the ReversiGame.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form1" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form2" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_matching"."createdAt" IS 'The created date of the ReversiMatching.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_note_pining"."createdAt" IS 'The created date of the UserNotePinings.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."noteVisibility" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."userId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."userHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_keypair"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_publickey"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "page"."createdAt" IS 'The created date of the Page.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "page"."updatedAt" IS 'The updated date of the Page.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "page"."userId" IS 'The ID of author.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."location" IS 'The location of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."birthday" IS 'The birthday (YYYY-MM-DD) of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."description" IS 'The description (bio) of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."url" IS 'Remote URL of the user.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."email" IS 'The email address of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."password" IS 'The password hash of the User. It will be null if the origin of the user is local.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."clientData" IS 'The client-specific data of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."room" IS 'The room data of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userHost" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."id" IS 'Variable-length id given to navigator.credentials.get()'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."publicKey" IS 'Variable-length public key used to verify attestations (hex-encoded).'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."lastUsed" IS 'The date of the last time the UserSecurityKey was successfully validated.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."name" IS 'User-defined name for this key'`);
+ await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."challenge" IS 'Hex-encoded sha256 hash of the challenge.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."createdAt" IS 'The date challenge was created for expiry purposes.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."registrationChallenge" IS 'Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "moderation_log"."createdAt" IS 'The created date of the ModerationLog.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "announcement"."createdAt" IS 'The created date of the Announcement.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "announcement"."updatedAt" IS 'The updated date of the Announcement.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "announcement_read"."createdAt" IS 'The created date of the AnnouncementRead.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."createdAt" IS 'The created date of the Clip.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."name" IS 'The name of the Clip.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."description" IS 'The description of the Clip.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip_note"."noteId" IS 'The note ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip_note"."clipId" IS 'The clip ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna"."createdAt" IS 'The created date of the Antenna.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna"."userId" IS 'The owner ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna"."name" IS 'The name of the Antenna.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."noteId" IS 'The note ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."antennaId" IS 'The antenna ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "promo_note"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "promo_note"."userId" IS '[Denormalized]'`);
+ await queryRunner.query(`COMMENT ON COLUMN "promo_read"."createdAt" IS 'The created date of the PromoRead.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "muted_note"."noteId" IS 'The note ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "muted_note"."userId" IS 'The user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "muted_note"."reason" IS 'The reason of the MutedNote.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_following"."createdAt" IS 'The created date of the ChannelFollowing.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followeeId" IS 'The followee channel ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followerId" IS 'The follower user ID.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS 'The created date of the ChannelNotePining.'`);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followerId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followeeId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel_following"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muted_note"."reason" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muted_note"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muted_note"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "promo_read"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "promo_note"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "promo_note"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."antennaId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "antenna"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip_note"."clipId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip_note"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "clip"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "announcement_read"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "announcement"."updatedAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "announcement"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "moderation_log"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."registrationChallenge" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."challenge" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."lastUsed" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."publicKey" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."id" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."room" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."clientData" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."password" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."email" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."url" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."description" IS 'The description (bio) of the User.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."birthday" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."location" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "page"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "page"."updatedAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "page"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_publickey"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_keypair"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."userHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."noteVisibility" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_note_pining"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_matching"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form2" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form1" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."startedAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "auth_session"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "signin"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."groupId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."reporterHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."targetUserHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_favorite"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userGroupId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userListId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_list"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockerId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockeeId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "blocking"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muting"."muterId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muting"."muteeId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "muting"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."themeColor" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."faviconUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."iconUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerEmail" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerName" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."openRegistrations" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareVersion" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareName" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."notesCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."usersCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."host" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "instance"."caughtAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeSharedInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerSharedInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followerId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."followeeId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "following"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "meta"."maxNoteTextLength" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "meta"."remoteDriveCapacityMb" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "meta"."localDriveCapacityMb" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "notification"."isRead" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "notification"."notifieeId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "notification"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userGroupId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user_group"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeSharedInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerSharedInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."requestId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "follow_request"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteChannelId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteUserId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteUserId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_watching"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note_reaction"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "poll_vote"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."userHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."channelId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."url" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."uri" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."renoteId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."replyId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "note"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."usersCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."notesCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."bannerId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "channel"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."iconUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."appId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."session" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."lastUsedAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "access_token"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."callbackUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."permission" IS 'The permission of the App.'`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."description" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."secret" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "app"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."token" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."uri" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."featured" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."sharedInbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."inbox" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."host" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isModerator" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isAdmin" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isCat" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isBot" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isLocked" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isSilenced" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."isSuspended" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."bannerId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."avatarId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."notesCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."followingCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."followersCount" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."usernameLower" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."username" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."updatedAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "user"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isLink" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isSensitive" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."folderId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."webpublicUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."thumbnailUrl" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."properties" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."blurhash" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."comment" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."size" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."type" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."md5" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userHost" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_file"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."parentId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."userId" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."name" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."createdAt" IS NULL`);
+ await queryRunner.query(`COMMENT ON COLUMN "log"."createdAt" IS NULL`);
+ }
+
+}
diff --git a/src/client/components/form-dialog.vue b/src/client/components/form-dialog.vue
index 2a067b67fa..0dc02258af 100644
--- a/src/client/components/form-dialog.vue
+++ b/src/client/components/form-dialog.vue
@@ -15,15 +15,15 @@
<div class="xkpnjxcv _section">
<label v-for="item in Object.keys(form).filter(item => !form[item].hidden)" :key="item">
<MkInput v-if="form[item].type === 'number'" v-model:value="values[item]" type="number" :step="form[item].step || 1">
- <span v-text="form[item].label || item"></span>
+ <span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</MkInput>
- <MkInput v-else-if="form[item].type === 'string' && !item.multiline" v-model:value="values[item]" type="text">
- <span v-text="form[item].label || item"></span>
+ <MkInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model:value="values[item]" type="text">
+ <span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</MkInput>
- <MkTextarea v-else-if="form[item].type === 'string' && item.multiline" v-model:value="values[item]">
- <span v-text="form[item].label || item"></span>
+ <MkTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model:value="values[item]">
+ <span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</MkTextarea>
<MkSwitch v-else-if="form[item].type === 'boolean'" v-model:value="values[item]">
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index bf89cbf568..8aa205bdec 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -102,7 +102,7 @@
<script lang="ts">
import { computed, defineAsyncComponent, defineComponent, markRaw, ref } from 'vue';
-import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle } from '@fortawesome/free-solid-svg-icons';
+import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
import { parse } from '../../mfm/parse';
import { sum, unique } from '../../prelude/array';
@@ -610,6 +610,11 @@ export default defineComponent({
text: this.$t('favorite'),
action: () => this.toggleFavorite(true)
}),
+ {
+ icon: faPaperclip,
+ text: this.$t('clip'),
+ action: () => this.clip()
+ },
(this.appearNote.userId != this.$store.state.i.id) ? statePromise.then(state => state.isWatching ? {
icon: faEyeSlash,
text: this.$t('unwatch'),
@@ -762,6 +767,43 @@ export default defineComponent({
});
},
+ async clip() {
+ const clips = await os.api('clips/list');
+ os.modalMenu([{
+ icon: faPlus,
+ text: this.$t('createNew'),
+ action: async () => {
+ const { canceled, result } = await os.form(this.$t('createNewClip'), {
+ name: {
+ type: 'string',
+ label: this.$t('name')
+ },
+ description: {
+ type: 'string',
+ required: false,
+ multiline: true,
+ label: this.$t('description')
+ },
+ isPublic: {
+ type: 'boolean',
+ label: this.$t('public')
+ }
+ });
+ if (canceled) return;
+
+ const clip = await os.apiWithDialog('clips/create', result);
+
+ os.apiWithDialog('clips/add-note', { clipId: clip.id, noteId: this.appearNote.id });
+ }
+ }, null, ...clips.map(clip => ({
+ text: clip.name,
+ action: () => {
+ os.apiWithDialog('clips/add-note', { clipId: clip.id, noteId: this.appearNote.id });
+ }
+ }))], this.$refs.menuButton, {
+ }).then(this.focus);
+ },
+
async promote() {
const { canceled, result: days } = await os.dialog({
title: this.$t('numberOfDays'),
diff --git a/src/client/pages/my-antennas/index.vue b/src/client/pages/my-antennas/index.vue
index c4f8ce31f7..20b1024c9c 100644
--- a/src/client/pages/my-antennas/index.vue
+++ b/src/client/pages/my-antennas/index.vue
@@ -6,7 +6,7 @@
<XAntenna v-if="draft" :antenna="draft" @created="onAntennaCreated" style="margin-bottom: var(--margin);"/>
<MkPagination :pagination="pagination" #default="{items}" class="antennas" ref="list">
- <XAntenna v-for="(antenna, i) in items" :key="antenna.id" :antenna="antenna" @created="onAntennaDeleted"/>
+ <XAntenna v-for="(antenna, i) in items" :key="antenna.id" :antenna="antenna" @deleted="onAntennaDeleted"/>
</MkPagination>
</div>
</div>
diff --git a/src/client/pages/my-clips/index.vue b/src/client/pages/my-clips/index.vue
new file mode 100644
index 0000000000..93adb94a4b
--- /dev/null
+++ b/src/client/pages/my-clips/index.vue
@@ -0,0 +1,78 @@
+<template>
+<div class="_section">
+ <MkButton @click="create" primary class="add"><Fa :icon="faPlus"/> {{ $t('add') }}</MkButton>
+
+ <div class="_content">
+ <MkPagination :pagination="pagination" #default="{items}" ref="list">
+ <MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`">{{ item.name }}</MkA>
+ </MkPagination>
+ </div>
+</div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { faPlus, faPaperclip } from '@fortawesome/free-solid-svg-icons';
+import MkPagination from '@/components/ui/pagination.vue';
+import MkButton from '@/components/ui/button.vue';
+import * as os from '@/os';
+
+export default defineComponent({
+ components: {
+ MkPagination,
+ MkButton,
+ },
+
+ data() {
+ return {
+ INFO: {
+ title: this.$t('clip'),
+ icon: faPaperclip,
+ action: {
+ icon: faPlus,
+ handler: this.create
+ }
+ },
+ pagination: {
+ endpoint: 'clips/list',
+ limit: 10,
+ },
+ draft: null,
+ faPlus
+ };
+ },
+
+ methods: {
+ async create() {
+ const { canceled, result } = await os.form(this.$t('createNewClip'), {
+ name: {
+ type: 'string',
+ label: this.$t('name')
+ },
+ description: {
+ type: 'string',
+ required: false,
+ multiline: true,
+ label: this.$t('description')
+ },
+ isPublic: {
+ type: 'boolean',
+ label: this.$t('public')
+ }
+ });
+ if (canceled) return;
+
+ os.apiWithDialog('clips/create', result);
+ },
+
+ onClipCreated() {
+ this.$refs.list.reload();
+ this.draft = null;
+ },
+
+ onClipDeleted() {
+ this.$refs.list.reload();
+ },
+ }
+});
+</script>
diff --git a/src/client/pages/test.vue b/src/client/pages/test.vue
index 820cd950a1..77aa264c31 100644
--- a/src/client/pages/test.vue
+++ b/src/client/pages/test.vue
@@ -162,7 +162,7 @@ export default defineComponent({
dialogCancelByBgClick: true,
dialogInput: false,
dialogResult: null,
- formTitle: null,
+ formTitle: 'Test form',
formForm: JSON.stringify({
foo: {
type: 'boolean',
@@ -179,6 +179,12 @@ export default defineComponent({
default: 'Misskey makes you happy.',
label: 'This is a string property'
},
+ qux: {
+ type: 'string',
+ multiline: true,
+ default: 'Misskey makes\nyou happy.',
+ label: 'Multiline string'
+ },
}, null, '\t'),
formResult: null,
mfm: '',
diff --git a/src/client/router.ts b/src/client/router.ts
index e8b6cfffd9..da2945be2c 100644
--- a/src/client/router.ts
+++ b/src/client/router.ts
@@ -55,6 +55,7 @@ export const router = createRouter({
{ path: '/my/groups', component: page('my-groups/index') },
{ path: '/my/groups/:group', component: page('my-groups/group') },
{ path: '/my/antennas', component: page('my-antennas/index') },
+ { path: '/my/clips', component: page('my-clips/index') },
{ path: '/my/apps', component: page('apps') },
{ path: '/scratchpad', component: page('scratchpad') },
{ path: '/instance', component: page('instance/index') },
diff --git a/src/client/sidebar.ts b/src/client/sidebar.ts
index 70f0bb3178..a541670df1 100644
--- a/src/client/sidebar.ts
+++ b/src/client/sidebar.ts
@@ -1,5 +1,5 @@
import { faBell, faComments, faEnvelope } from '@fortawesome/free-regular-svg-icons';
-import { faAt, faBroadcastTower, faCloud, faColumns, faDoorClosed, faFileAlt, faFireAlt, faGamepad, faHashtag, faListUl, faSatellite, faSatelliteDish, faSearch, faStar, faTerminal, faUserClock, faUsers } from '@fortawesome/free-solid-svg-icons';
+import { faAt, faBroadcastTower, faCloud, faColumns, faDoorClosed, faFileAlt, faFireAlt, faGamepad, faHashtag, faListUl, faPaperclip, faSatellite, faSatelliteDish, faSearch, faStar, faTerminal, faUserClock, faUsers } from '@fortawesome/free-solid-svg-icons';
import { computed } from 'vue';
import { store } from '@/store';
import { search } from '@/scripts/search';
@@ -99,6 +99,12 @@ export const sidebarDef = {
show: computed(() => store.getters.isSignedIn),
to: '/my/pages',
},
+ clips: {
+ title: 'clip',
+ icon: faPaperclip,
+ show: computed(() => store.getters.isSignedIn),
+ to: '/my/clips',
+ },
channels: {
title: 'channel',
icon: faSatelliteDish,
diff --git a/src/models/entities/clip.ts b/src/models/entities/clip.ts
index 37d21f73b1..66b5b8847e 100644
--- a/src/models/entities/clip.ts
+++ b/src/models/entities/clip.ts
@@ -35,4 +35,10 @@ export class Clip {
default: false
})
public isPublic: boolean;
+
+ @Column('varchar', {
+ length: 2048, nullable: true, default: null,
+ comment: 'The description of the Clip.'
+ })
+ public description: string | null;
}
diff --git a/src/models/repositories/clip.ts b/src/models/repositories/clip.ts
index 9644ceec7e..7cc3fb7110 100644
--- a/src/models/repositories/clip.ts
+++ b/src/models/repositories/clip.ts
@@ -16,6 +16,7 @@ export class ClipRepository extends Repository<Clip> {
id: clip.id,
createdAt: clip.createdAt.toISOString(),
name: clip.name,
+ description: clip.description,
};
}
}
@@ -42,5 +43,10 @@ export const packedClipSchema = {
optional: false as const, nullable: false as const,
description: 'The name of the Clip.'
},
+ description: {
+ type: 'string' as const,
+ optional: false as const, nullable: true as const,
+ description: 'The description of the Clip.'
+ },
},
};
diff --git a/src/server/api/endpoints/clips/add-note.ts b/src/server/api/endpoints/clips/add-note.ts
new file mode 100644
index 0000000000..4f5cc649e3
--- /dev/null
+++ b/src/server/api/endpoints/clips/add-note.ts
@@ -0,0 +1,76 @@
+import $ from 'cafy';
+import { ID } from '../../../../misc/cafy-id';
+import define from '../../define';
+import { ClipNotes, Clips } from '../../../../models';
+import { ApiError } from '../../error';
+import { genId } from '../../../../misc/gen-id';
+import { getNote } from '../../common/getters';
+
+export const meta = {
+ tags: ['account', 'notes', 'clips'],
+
+ requireCredential: true as const,
+
+ kind: 'write:account',
+
+ params: {
+ clipId: {
+ validator: $.type(ID),
+ },
+
+ noteId: {
+ validator: $.type(ID),
+ },
+ },
+
+ errors: {
+ noSuchClip: {
+ message: 'No such clip.',
+ code: 'NO_SUCH_CLIP',
+ id: 'd6e76cc0-a1b5-4c7c-a287-73fa9c716dcf'
+ },
+
+ noSuchNote: {
+ message: 'No such note.',
+ code: 'NO_SUCH_NOTE',
+ id: 'fc8c0b49-c7a3-4664-a0a6-b418d386bb8b'
+ },
+
+ alreadyClipped: {
+ message: 'The note has already been clipped.',
+ code: 'ALREADY_CLIPPED',
+ id: '734806c4-542c-463a-9311-15c512803965'
+ },
+ }
+};
+
+export default define(meta, async (ps, user) => {
+ const clip = await Clips.findOne({
+ id: ps.clipId,
+ userId: user.id
+ });
+
+ if (clip == null) {
+ throw new ApiError(meta.errors.noSuchClip);
+ }
+
+ const note = await getNote(ps.noteId).catch(e => {
+ if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
+ throw e;
+ });
+
+ const exist = await ClipNotes.findOne({
+ noteId: note.id,
+ clipId: clip.id
+ });
+
+ if (exist != null) {
+ throw new ApiError(meta.errors.alreadyClipped);
+ }
+
+ await ClipNotes.save({
+ id: genId(),
+ noteId: note.id,
+ clipId: clip.id
+ });
+});
diff --git a/src/server/api/endpoints/clips/create.ts b/src/server/api/endpoints/clips/create.ts
index f1b20c1157..0d122dbb9b 100644
--- a/src/server/api/endpoints/clips/create.ts
+++ b/src/server/api/endpoints/clips/create.ts
@@ -13,6 +13,14 @@ export const meta = {
params: {
name: {
validator: $.str.range(1, 100)
+ },
+
+ isPublic: {
+ validator: $.optional.bool
+ },
+
+ description: {
+ validator: $.optional.nullable.str.range(1, 2048)
}
},
};
@@ -23,6 +31,8 @@ export default define(meta, async (ps, user) => {
createdAt: new Date(),
userId: user.id,
name: ps.name,
+ isPublic: ps.isPublic,
+ description: ps.description,
});
return await Clips.pack(clip);
diff --git a/src/server/api/endpoints/clips/notes.ts b/src/server/api/endpoints/clips/notes.ts
index 4cd7e8c621..5289533a1e 100644
--- a/src/server/api/endpoints/clips/notes.ts
+++ b/src/server/api/endpoints/clips/notes.ts
@@ -1,10 +1,11 @@
import $ from 'cafy';
import { ID } from '../../../../misc/cafy-id';
import define from '../../define';
-import { Clips, Notes } from '../../../../models';
+import { ClipNotes, Clips, Notes } from '../../../../models';
import { makePaginationQuery } from '../../common/make-pagination-query';
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
import { generateMutedUserQuery } from '../../common/generate-muted-user-query';
+import { ApiError } from '../../error';
export const meta = {
tags: ['account', 'notes', 'clips'],
@@ -14,6 +15,10 @@ export const meta = {
kind: 'read:account',
params: {
+ clipId: {
+ validator: $.type(ID),
+ },
+
limit: {
validator: $.optional.num.range(1, 100),
default: 10
@@ -30,7 +35,7 @@ export const meta = {
errors: {
noSuchClip: {
- message: 'No such list.',
+ message: 'No such clip.',
code: 'NO_SUCH_CLIP',
id: '1d7645e6-2b6d-4635-b0fe-fe22b0e72e00'
}