diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c66f0859..dc99ee33fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Feat: プロフィールでのリンク検証 - Feat: 通知をテストできるようになりました - Feat: PWAのアイコンが設定できるようになりました +- Enhance: サーバー名の略称が設定できるようになりました - Enhance: アンテナの受信ソースに指定したユーザを除外するものを追加 - Enhance: 二要素認証設定時のセキュリティを強化 - パスワード入力が必要な操作を行う際、二要素認証が有効であれば確認コードの入力も必要になりました @@ -67,6 +68,7 @@ - Enhance: ノート詳細ページ読み込み時のパフォーマンスが向上しました - Enhance: タイムラインでリスト/アンテナ選択時のパフォーマンスを改善 - Enhance: 「Moderation note」、「Add moderation note」をローカライズできるように +- Enhance: プラグインのソースコードを確認・コピーできるように - Enhance: 細かなデザインの調整 - Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正 - Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正 @@ -76,6 +78,7 @@ - Fix: Misskeyプラグインをインストールする際のAiScriptバージョンのチェックが0.14.0以降に対応していない問題を修正 - Fix: 他のサーバーのユーザーへ「メッセージを送信」した時の初期テキストのメンションが間違っている問題を修正 - Fix: 環境によってはMisskey Webが開けない問題を修正 +- Fix: プラグインの権限リストが見れない問題を修正 ### Server - Change: cacheRemoteFilesの初期値はfalseになりました @@ -87,6 +90,7 @@ - Enhance: 自分へのメンション一覧を取得する際のパフォーマンスを向上 - Enhance: Docker環境でjemallocを使用することでメモリ使用量を削減 - Fix: MK_ONLY_SERVERオプションを指定した際にクラッシュする問題を修正 +- Fix: notes/reactionsのページネーションが機能しない問題を修正 - Fix: ノート検索 `notes/search` にてhostを指定した際に検索結果に反映されるように - Fix: 一部のfeatured noteを照会できない問題を修正 - Fix: muteがapiからのuser list timeline取得で機能しない問題を修正 diff --git a/locales/index.d.ts b/locales/index.d.ts index 597b736894..8ad3223dfe 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1165,6 +1165,8 @@ export interface Locale { "appIconStyleRecommendation": string; "appIconResolutionMustBe": string; "manifestJsonOverride": string; + "shortName": string; + "shortNameDescription": string; }; "_accountMigration": { "moveFrom": string; @@ -1639,6 +1641,7 @@ export interface Locale { "install": string; "installWarn": string; "manage": string; + "viewSource": string; }; "_preferencesBackups": { "list": string; @@ -2175,6 +2178,7 @@ export interface Locale { "notificationWillBeDisplayedLikeThis": string; "_types": { "all": string; + "note": string; "follow": string; "mention": string; "reply": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 3111e3b294..31b08f8e35 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1163,6 +1163,8 @@ _serverSettings: appIconStyleRecommendation: "円形もしくは角丸にクロップされる場合があるため、塗り潰された余白のある背景を持つことが推奨されます。" appIconResolutionMustBe: "解像度は必ず{resolution}である必要があります。" manifestJsonOverride: "manifest.jsonのオーバーライド" + shortName: "略称" + shortNameDescription: "サーバーの正式名称が長い場合に、代わりに表示することのできる略称や通称。" _accountMigration: moveFrom: "別のアカウントからこのアカウントに移行" @@ -1556,6 +1558,7 @@ _plugin: install: "プラグインのインストール" installWarn: "信頼できないプラグインはインストールしないでください。" manage: "プラグインの管理" + viewSource: "ソースを表示" _preferencesBackups: list: "作成したバックアップ" @@ -2090,6 +2093,7 @@ _notification: _types: all: "すべて" + note: "ユーザーの新規投稿" follow: "フォロー" mention: "メンション" reply: "リプライ" diff --git a/package.json b/package.json index c9f3c4d5a8..2022abc711 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2023.9.0-beta.11-prismisskey.3", + "version": "2023.9.0-rc.1", "codename": "nasubi", "repository": { "type": "git", @@ -55,7 +55,7 @@ "@typescript-eslint/parser": "6.7.2", "cross-env": "7.0.3", "cypress": "13.2.0", - "eslint": "8.49.0", + "eslint": "8.50.0", "start-server-and-test": "2.0.1" }, "optionalDependencies": { diff --git a/packages/backend/migration/1695440131671-short-name.js b/packages/backend/migration/1695440131671-short-name.js new file mode 100644 index 0000000000..2c37297fc1 --- /dev/null +++ b/packages/backend/migration/1695440131671-short-name.js @@ -0,0 +1,11 @@ +export class ShortName1695440131671 { + name = 'ShortName1695440131671' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" ADD "shortName" character varying(64)`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "shortName"`); + } +} diff --git a/packages/backend/package.json b/packages/backend/package.json index 27747e3cd4..97fbaab308 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -71,9 +71,9 @@ "@fastify/multipart": "7.7.3", "@fastify/static": "6.11.2", "@fastify/view": "8.2.0", - "@nestjs/common": "10.2.5", - "@nestjs/core": "10.2.5", - "@nestjs/testing": "10.2.5", + "@nestjs/common": "10.2.6", + "@nestjs/core": "10.2.6", + "@nestjs/testing": "10.2.6", "@peertube/http-signature": "1.7.0", "@simplewebauthn/server": "8.1.1", "@sinonjs/fake-timers": "11.1.0", @@ -86,7 +86,7 @@ "bcryptjs": "2.4.3", "blurhash": "2.0.5", "body-parser": "1.20.2", - "bullmq": "4.11.3", + "bullmq": "4.11.4", "cacheable-lookup": "7.0.0", "cbor": "9.0.1", "chalk": "5.3.0", @@ -174,7 +174,7 @@ "@simplewebauthn/typescript-types": "8.0.0", "@swc/jest": "0.2.29", "@types/accepts": "1.3.5", - "@types/archiver": "5.3.2", + "@types/archiver": "5.3.3", "@types/bcryptjs": "2.4.4", "@types/body-parser": "1.19.3", "@types/cbor": "6.0.0", @@ -216,7 +216,7 @@ "@typescript-eslint/parser": "6.7.2", "aws-sdk-client-mock": "3.0.0", "cross-env": "7.0.3", - "eslint": "8.49.0", + "eslint": "8.50.0", "eslint-plugin-import": "2.28.1", "execa": "8.0.1", "jest": "29.7.0", diff --git a/packages/backend/src/models/Meta.ts b/packages/backend/src/models/Meta.ts index a9e116341f..e69bef8e98 100644 --- a/packages/backend/src/models/Meta.ts +++ b/packages/backend/src/models/Meta.ts @@ -20,6 +20,11 @@ export class MiMeta { }) public name: string | null; + @Column('varchar', { + length: 64, nullable: true, + }) + public shortName: string | null; + @Column('varchar', { length: 1024, nullable: true, }) diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index fe9c134d84..c3ba07cdd0 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -321,6 +321,7 @@ export default class extends Endpoint { // eslint- maintainerEmail: instance.maintainerEmail, version: this.config.version, name: instance.name, + shortName: instance.shortName, uri: this.config.url, description: instance.description, langs: instance.langs, diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 614e0a95d7..eabf1f306c 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -44,6 +44,7 @@ export const paramDef = { backgroundImageUrl: { type: 'string', nullable: true }, logoImageUrl: { type: 'string', nullable: true }, name: { type: 'string', nullable: true }, + shortName: { type: 'string', nullable: true }, description: { type: 'string', nullable: true }, defaultLightTheme: { type: 'string', nullable: true }, defaultDarkTheme: { type: 'string', nullable: true }, @@ -188,6 +189,10 @@ export default class extends Endpoint { // eslint- set.name = ps.name; } + if (ps.shortName !== undefined) { + set.shortName = ps.shortName; + } + if (ps.description !== undefined) { set.description = ps.description; } diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index c0cbfa3f48..fa6486ed18 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -40,6 +40,10 @@ export const meta = { type: 'string', optional: false, nullable: false, }, + shortName: { + type: 'string', + optional: false, nullable: true, + }, uri: { type: 'string', optional: false, nullable: false, @@ -288,6 +292,7 @@ export default class extends Endpoint { // eslint- version: this.config.version, name: instance.name, + shortName: instance.shortName, uri: this.config.url, description: instance.description, langs: instance.langs, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index dae31364ee..a2c1778199 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -4,12 +4,13 @@ */ import { Inject, Injectable } from '@nestjs/common'; +import { Brackets, type FindOptionsWhere } from 'typeorm'; import type { NoteReactionsRepository } from '@/models/_.js'; import type { MiNoteReaction } from '@/models/NoteReaction.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { NoteReactionEntityService } from '@/core/entities/NoteReactionEntityService.js'; import { DI } from '@/di-symbols.js'; -import type { FindOptionsWhere } from 'typeorm'; +import { QueryService } from '@/core/QueryService.js'; export const meta = { tags: ['notes', 'reactions'], @@ -44,7 +45,6 @@ export const paramDef = { noteId: { type: 'string', format: 'misskey:id' }, type: { type: 'string', nullable: true }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, - offset: { type: 'integer', default: 0 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, }, @@ -58,29 +58,23 @@ export default class extends Endpoint { // eslint- private noteReactionsRepository: NoteReactionsRepository, private noteReactionEntityService: NoteReactionEntityService, + private queryService: QueryService, ) { super(meta, paramDef, async (ps, me) => { - const query = { - noteId: ps.noteId, - } as FindOptionsWhere; + const query = this.queryService.makePaginationQuery(this.noteReactionsRepository.createQueryBuilder('reaction'), ps.sinceId, ps.untilId) + .andWhere('reaction.noteId = :noteId', { noteId: ps.noteId }) + .leftJoinAndSelect('reaction.user', 'user') + .leftJoinAndSelect('reaction.note', 'note'); if (ps.type) { // ローカルリアクションはホスト名が . とされているが // DB 上ではそうではないので、必要に応じて変換 const suffix = '@.:'; const type = ps.type.endsWith(suffix) ? ps.type.slice(0, ps.type.length - suffix.length) + ':' : ps.type; - query.reaction = type; + query.andWhere('reaction.reaction = :type', { type }); } - const reactions = await this.noteReactionsRepository.find({ - where: query, - take: ps.limit, - skip: ps.offset, - order: { - id: -1, - }, - relations: ['user', 'note'], - }); + const reactions = await query.limit(ps.limit).getMany(); return await Promise.all(reactions.map(reaction => this.noteReactionEntityService.pack(reaction, me))); }); diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 7b1dd92d73..1faff24201 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -114,10 +114,10 @@ export class ClientServerService { let manifest = { // 空文字列の場合右辺を使いたいため // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - 'short_name': instance.name || 'Misskey', + 'short_name': instance.shortName || instance.name || this.config.host, // 空文字列の場合右辺を使いたいため // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - 'name': instance.name || 'Misskey', + 'name': instance.name || this.config.host, 'start_url': '/', 'display': 'standalone', 'background_color': '#313a42', diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index ab74a1f7f4..71bcf9462f 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -35,7 +35,7 @@ html link(rel='prefetch' href=infoImageUrl) link(rel='prefetch' href=notFoundImageUrl) //- https://github.com/misskey-dev/misskey/issues/9842 - link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.32.0') + link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.35.0') link(rel='modulepreload' href=`/vite/${clientEntry.file}`) if !config.clientManifestExists diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 6285c1bc33..bce300ff6e 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -23,7 +23,7 @@ "@rollup/plugin-replace": "5.0.2", "@rollup/pluginutils": "5.0.4", "@syuilo/aiscript": "0.16.0", - "@tabler/icons-webfont": "2.32.0", + "@tabler/icons-webfont": "2.35.0", "@vitejs/plugin-vue": "4.3.4", "@vue-macros/reactivity-transform": "0.3.23", "@vue/compiler-sfc": "3.3.4", @@ -77,24 +77,24 @@ "vuedraggable": "next" }, "devDependencies": { - "@storybook/addon-actions": "7.4.3", - "@storybook/addon-essentials": "7.4.3", - "@storybook/addon-interactions": "7.4.3", - "@storybook/addon-links": "7.4.3", - "@storybook/addon-storysource": "7.4.3", - "@storybook/addons": "7.4.3", - "@storybook/blocks": "7.4.3", - "@storybook/core-events": "7.4.3", + "@storybook/addon-actions": "7.4.4", + "@storybook/addon-essentials": "7.4.4", + "@storybook/addon-interactions": "7.4.4", + "@storybook/addon-links": "7.4.4", + "@storybook/addon-storysource": "7.4.4", + "@storybook/addons": "7.4.4", + "@storybook/blocks": "7.4.4", + "@storybook/core-events": "7.4.4", "@storybook/jest": "0.2.2", - "@storybook/manager-api": "7.4.3", - "@storybook/preview-api": "7.4.3", - "@storybook/react": "7.4.3", - "@storybook/react-vite": "7.4.3", + "@storybook/manager-api": "7.4.4", + "@storybook/preview-api": "7.4.4", + "@storybook/react": "7.4.4", + "@storybook/react-vite": "7.4.4", "@storybook/testing-library": "0.2.1", - "@storybook/theming": "7.4.3", - "@storybook/types": "7.4.3", - "@storybook/vue3": "7.4.3", - "@storybook/vue3-vite": "7.4.3", + "@storybook/theming": "7.4.4", + "@storybook/types": "7.4.4", + "@storybook/vue3": "7.4.4", + "@storybook/vue3-vite": "7.4.4", "@testing-library/vue": "7.0.0", "@types/escape-regexp": "0.0.1", "@types/estree": "1.0.1", @@ -115,7 +115,7 @@ "acorn": "8.10.0", "cross-env": "7.0.3", "cypress": "13.2.0", - "eslint": "8.49.0", + "eslint": "8.50.0", "eslint-plugin-import": "2.28.1", "eslint-plugin-vue": "9.17.0", "fast-glob": "3.3.1", @@ -128,7 +128,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "start-server-and-test": "2.0.1", - "storybook": "7.4.3", + "storybook": "7.4.4", "storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme", "summaly": "github:misskey-dev/summaly", "vite-plugin-turbosnap": "1.0.3", diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 2d123385f5..caa095d757 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -14,36 +14,36 @@ SPDX-License-Identifier: AGPL-3.0-only > - + {{ i18n.ts.none }} @@ -62,7 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only