From 2fb31a520a4bdb4f2654c3c5ee8b85e04da8d065 Mon Sep 17 00:00:00 2001 From: Ryosei <116582524+rainy6@users.noreply.github.com> Date: Sun, 6 Aug 2023 11:34:56 +0900 Subject: [PATCH 1/7] =?UTF-8?q?fix:=E3=83=89=E3=83=A9=E3=82=A4=E3=83=96=20?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=82=92=E7=A2=BA=E8=AA=8D=E3=81=99=E3=82=8B=E3=83=80=E3=82=A4?= =?UTF-8?q?=E3=82=A2=E3=83=AD=E3=82=B0=E3=81=8C=E8=AA=A4=E8=A7=A3=E3=82=92?= =?UTF-8?q?=E6=8B=9B=E3=81=8F=20(#11465)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix:ドライブ ファイルの削除を確認するダイアログが誤解を招く * fix:ドライブのファイル削除メッセージ修正(全て→一部) --- locales/ja-JP.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index a91b919e6e..cab5c8f97a 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -74,7 +74,7 @@ import: "インポート" export: "エクスポート" files: "ファイル" download: "ダウンロード" -driveFileDeleteConfirm: "ファイル「{name}」を削除しますか?このファイルを使用した全てのコンテンツからも削除されます。" +driveFileDeleteConfirm: "ファイル「{name}」を削除しますか?このファイルを使用した一部のコンテンツも削除されます。" unfollowConfirm: "{name}のフォローを解除しますか?" exportRequested: "エクスポートをリクエストしました。これには時間がかかる場合があります。エクスポートが終わると、「ドライブ」に追加されます。" importRequested: "インポートをリクエストしました。これには時間がかかる場合があります。" From 1d557089e935d8266c2ad8e5e71251da26d78b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 6 Aug 2023 11:46:19 +0900 Subject: [PATCH 2/7] Delete Misskey Forum (Issue template) (#11475) --- .github/ISSUE_TEMPLATE/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 730647b086..e8b65dc3b9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,7 +1,4 @@ contact_links: - - name: 👪 Misskey Forum - url: https://forum.misskey.io/ - about: Ask questions and share knowledge - name: 💬 Misskey official Discord url: https://discord.gg/Wp8gVStHW3 about: Chat freely about Misskey From 722a731c267bdb647c1a0b532c053fb70d3b72d6 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 6 Aug 2023 12:15:28 +0000 Subject: [PATCH 3/7] chore: Increase displayLimit in about.federation.vue https://github.com/misskey-dev/misskey/issues/11355#issuecomment-1666823238 --- packages/frontend/src/pages/about.federation.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/src/pages/about.federation.vue b/packages/frontend/src/pages/about.federation.vue index 1798d7525e..0796553338 100644 --- a/packages/frontend/src/pages/about.federation.vue +++ b/packages/frontend/src/pages/about.federation.vue @@ -64,6 +64,7 @@ let sort = $ref('+pubSub'); const pagination = { endpoint: 'federation/instances' as const, limit: 10, + displatLimit: 50, offsetMode: true, params: computed(() => ({ sort: sort, From db5046ed3a6b156094f2863b3941854865c25214 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 6 Aug 2023 12:16:49 +0000 Subject: [PATCH 4/7] fix typo --- packages/frontend/src/pages/about.federation.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/about.federation.vue b/packages/frontend/src/pages/about.federation.vue index 0796553338..0c40656058 100644 --- a/packages/frontend/src/pages/about.federation.vue +++ b/packages/frontend/src/pages/about.federation.vue @@ -53,7 +53,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { computed } from 'vue'; import MkInput from '@/components/MkInput.vue'; import MkSelect from '@/components/MkSelect.vue'; -import MkPagination from '@/components/MkPagination.vue'; +import MkPagination, { Paging } from '@/components/MkPagination.vue'; import MkInstanceCardMini from '@/components/MkInstanceCardMini.vue'; import FormSplit from '@/components/form/split.vue'; import { i18n } from '@/i18n'; @@ -64,7 +64,7 @@ let sort = $ref('+pubSub'); const pagination = { endpoint: 'federation/instances' as const, limit: 10, - displatLimit: 50, + displayLimit: 50, offsetMode: true, params: computed(() => ({ sort: sort, @@ -78,7 +78,7 @@ const pagination = { state === 'notResponding' ? { notResponding: true } : {}), })), -}; +} as Paging; function getStatus(instance) { if (instance.isSuspended) return 'Suspended'; From 43375409f7377b9059cb5a8877117a30fd7151e2 Mon Sep 17 00:00:00 2001 From: Srgr0 <66754887+Srgr0@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:22:01 +0900 Subject: [PATCH 5/7] =?UTF-8?q?fix(frontend):=20webkit-text-size-adjust?= =?UTF-8?q?=E3=82=92100%=E3=81=AB=E5=9B=BA=E5=AE=9A=E3=81=99=E3=82=8B=20(#?= =?UTF-8?q?11487)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * disable webkit-text-size-adjust * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/frontend/src/style.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09d19b6035..e2c7136646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Enhance: 自分が押したリアクションのデザインを改善 - Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正 - Fix: 未読のお知らせの「わかった」をクリック・タップしてもその場で「わかった」が消えない問題を修正 +- Fix: iOSで画面を回転させるとテキストサイズが変わる問題を修正 ### Server - cacheRemoteFilesの初期値はfalseになりました diff --git a/packages/frontend/src/style.scss b/packages/frontend/src/style.scss index 8270e8fe70..dbfb8d0dbf 100644 --- a/packages/frontend/src/style.scss +++ b/packages/frontend/src/style.scss @@ -40,6 +40,7 @@ html { line-height: 1.35; text-size-adjust: 100%; tab-size: 2; + -webkit-text-size-adjust: 100%; &, * { scrollbar-color: var(--scrollbarHandle) transparent; From b26e4dc5059dedd879ed08e303e5bd6f2f4e3f1d Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Tue, 8 Aug 2023 13:23:25 +0900 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20mute=E3=81=8Capi=E3=81=8B=E3=82=89?= =?UTF-8?q?=E3=81=AEuser=20list=20timeline=E5=8F=96=E5=BE=97=E3=81=A7?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=81=97=E3=81=AA=E3=81=84=20(#11480)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../src/server/api/endpoints/notes/user-list-timeline.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2c7136646..763b577494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ ### Server - cacheRemoteFilesの初期値はfalseになりました +- fix: muteがapiからのuser list timeline取得で機能しない問題を修正 ## 13.14.2 diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 5b6191ca24..d4ec328721 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -96,6 +96,10 @@ export default class extends Endpoint { .andWhere('userListJoining.userListId = :userListId', { userListId: list.id }); this.queryService.generateVisibilityQuery(query, me); + this.queryService.generateMutedUserQuery(query, me); + this.queryService.generateMutedNoteQuery(query, me); + this.queryService.generateBlockedUserQuery(query, me); + this.queryService.generateMutedUserRenotesQueryForNotes(query, me); if (ps.includeMyRenotes === false) { query.andWhere(new Brackets(qb => { From f6a3f6f5f10734c50e6c00b410d7ea12d1d8f505 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 8 Aug 2023 13:24:30 +0900 Subject: [PATCH 7/7] enhance(backend): Improve behavior of correctFilename (#11484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(backend): Improve behavior of correctFilename * :v: * 未知のファイル形式かつ拡張子がある場合は何もしない * :v: * .ext --------- Co-authored-by: syuilo --- CHANGELOG.md | 1 + packages/backend/src/misc/correct-filename.ts | 56 +++++++++++++++---- .../test/unit/misc/correct-filename.ts | 48 ++++++++++++++++ packages/backend/test/unit/misc/others.ts | 28 ---------- pnpm-lock.yaml | 17 ++---- 5 files changed, 100 insertions(+), 50 deletions(-) create mode 100644 packages/backend/test/unit/misc/correct-filename.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 763b577494..e2620db00d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ ### Server - cacheRemoteFilesの初期値はfalseになりました +- ファイルアップロード時等にファイル名の拡張子を修正する関数(correctFilename)の挙動を改善 - fix: muteがapiからのuser list timeline取得で機能しない問題を修正 ## 13.14.2 diff --git a/packages/backend/src/misc/correct-filename.ts b/packages/backend/src/misc/correct-filename.ts index a702f0be0d..34cb458a2c 100644 --- a/packages/backend/src/misc/correct-filename.ts +++ b/packages/backend/src/misc/correct-filename.ts @@ -3,18 +3,54 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -// 与えられた拡張子とファイル名が一致しているかどうかを確認し、 -// 一致していない場合は拡張子を付与して返す +/** + * Array.includes()よりSet.has()の方が高速 + */ +const targetExtsToSkip = new Set([ + '.gz', + '.tar', + '.tgz', + '.bz2', + '.xz', + '.zip', + '.7z', +]); + +const extRegExp = /\.[0-9a-zA-Z]+$/i; + +/** + * 与えられた拡張子とファイル名が一致しているかどうかを確認し、 + * 一致していない場合は拡張子を付与して返す + * + * extはfile-typeのextを想定 + */ export function correctFilename(filename: string, ext: string | null) { - const dotExt = ext ? ext.startsWith('.') ? ext : `.${ext}` : '.unknown'; - if (filename.endsWith(dotExt)) { - return filename; - } - if (ext === 'jpg' && filename.endsWith('.jpeg')) { - return filename; - } - if (ext === 'tif' && filename.endsWith('.tiff')) { + const dotExt = ext ? ext[0] === '.' ? ext : `.${ext}` : '.unknown'; + + const match = extRegExp.exec(filename); + if (!match || !match[0]) { + // filenameが拡張子を持っていない場合は拡張子をつける + return `${filename}${dotExt}`; + } + + const filenameExt = match[0].toLowerCase(); + if ( + // 未知のファイル形式かつ拡張子がある場合は何もしない + ext === null || + // 拡張子が一致している場合は何もしない + filenameExt === dotExt || + + // jpeg, tiffを同一視 + dotExt === '.jpg' && filenameExt === '.jpeg' || + dotExt === '.tif' && filenameExt === '.tiff' || + + // 圧縮形式っぽければ下手に拡張子を変えない + // https://github.com/misskey-dev/misskey/issues/11482 + targetExtsToSkip.has(dotExt) + ) { return filename; } + + // 拡張子があるが一致していないなどの場合は拡張子を付け足す return `${filename}${dotExt}`; } diff --git a/packages/backend/test/unit/misc/correct-filename.ts b/packages/backend/test/unit/misc/correct-filename.ts new file mode 100644 index 0000000000..8138b2361f --- /dev/null +++ b/packages/backend/test/unit/misc/correct-filename.ts @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { correctFilename } from '@/misc/correct-filename.js'; + +describe(correctFilename, () => { + it('no ext to null', () => { + expect(correctFilename('test', null)).toBe('test.unknown'); + }); + it('no ext to jpg', () => { + expect(correctFilename('test', 'jpg')).toBe('test.jpg'); + }); + it('jpg to webp', () => { + expect(correctFilename('test.jpg', 'webp')).toBe('test.jpg.webp'); + }); + it('jpg to .webp', () => { + expect(correctFilename('test.jpg', '.webp')).toBe('test.jpg.webp'); + }); + it('jpeg to jpg', () => { + expect(correctFilename('test.jpeg', 'jpg')).toBe('test.jpeg'); + }); + it('JPEG to jpg', () => { + expect(correctFilename('test.JPEG', 'jpg')).toBe('test.JPEG'); + }); + it('jpg to jpg', () => { + expect(correctFilename('test.jpg', 'jpg')).toBe('test.jpg'); + }); + it('JPG to jpg', () => { + expect(correctFilename('test.JPG', 'jpg')).toBe('test.JPG'); + }); + it('tiff to tif', () => { + expect(correctFilename('test.tiff', 'tif')).toBe('test.tiff'); + }); + it('skip gz', () => { + expect(correctFilename('test.unitypackage', 'gz')).toBe('test.unitypackage'); + }); + it('skip text file', () => { + expect(correctFilename('test.txt', null)).toBe('test.txt'); + }); + it('unknown', () => { + expect(correctFilename('test.hoge', null)).toBe('test.hoge'); + }); + test('non ascii with space', () => { + expect(correctFilename('ファイル 名前', 'jpg')).toBe('ファイル 名前.jpg'); + }); +}); diff --git a/packages/backend/test/unit/misc/others.ts b/packages/backend/test/unit/misc/others.ts index e2e484dfd7..b16d26d866 100644 --- a/packages/backend/test/unit/misc/others.ts +++ b/packages/backend/test/unit/misc/others.ts @@ -5,7 +5,6 @@ import { describe, test, expect } from '@jest/globals'; import { contentDisposition } from '@/misc/content-disposition.js'; -import { correctFilename } from '@/misc/correct-filename.js'; describe('misc:content-disposition', () => { test('inline', () => { @@ -18,30 +17,3 @@ describe('misc:content-disposition', () => { expect(contentDisposition('attachment', 'ファイル名')).toBe('attachment; filename=\"_____\"; filename*=UTF-8\'\'%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D'); }); }); - -describe('misc:correct-filename', () => { - test('simple', () => { - expect(correctFilename('filename', 'jpg')).toBe('filename.jpg'); - }); - test('with same ext', () => { - expect(correctFilename('filename.jpg', 'jpg')).toBe('filename.jpg'); - }); - test('.ext', () => { - expect(correctFilename('filename.jpg', '.jpg')).toBe('filename.jpg'); - }); - test('with different ext', () => { - expect(correctFilename('filename.webp', 'jpg')).toBe('filename.webp.jpg'); - }); - test('non ascii with space', () => { - expect(correctFilename('ファイル 名前', 'jpg')).toBe('ファイル 名前.jpg'); - }); - test('jpeg', () => { - expect(correctFilename('filename.jpeg', 'jpg')).toBe('filename.jpeg'); - }); - test('tiff', () => { - expect(correctFilename('filename.tiff', 'tif')).toBe('filename.tiff'); - }); - test('null ext', () => { - expect(correctFilename('filename', null)).toBe('filename.unknown'); - }); -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 13fc490731..1a559e867e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -358,7 +358,7 @@ importers: version: 2.1.0 summaly: specifier: github:misskey-dev/summaly - version: github.com/misskey-dev/summaly/089a0ad8e8c780e5c088b1c528aa95c5827cbdcc + version: github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7 systeminformation: specifier: 5.18.9 version: 5.18.9 @@ -997,7 +997,7 @@ importers: version: github.com/misskey-dev/storybook-addon-misskey-theme/cf583db098365b2ccc81a82f63ca9c93bc32b640(@storybook/blocks@7.0.27)(@storybook/components@7.1.0)(@storybook/core-events@7.0.27)(@storybook/manager-api@7.0.27)(@storybook/preview-api@7.0.27)(@storybook/theming@7.0.27)(@storybook/types@7.0.27)(react-dom@18.2.0)(react@18.2.0) summaly: specifier: github:misskey-dev/summaly - version: github.com/misskey-dev/summaly/089a0ad8e8c780e5c088b1c528aa95c5827cbdcc + version: github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7 vite-plugin-turbosnap: specifier: 1.0.2 version: 1.0.2 @@ -5345,7 +5345,7 @@ packages: hasBin: true requiresBuild: true dependencies: - detect-libc: 2.0.1 + detect-libc: 2.0.2 https-proxy-agent: 5.0.1 make-dir: 3.1.0 node-fetch: 2.6.11 @@ -11496,13 +11496,6 @@ packages: engines: {node: '>=8'} dev: true - /detect-libc@2.0.1: - resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} - engines: {node: '>=8'} - requiresBuild: true - dev: false - optional: true - /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} @@ -22129,8 +22122,8 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - github.com/misskey-dev/summaly/089a0ad8e8c780e5c088b1c528aa95c5827cbdcc: - resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/089a0ad8e8c780e5c088b1c528aa95c5827cbdcc} + github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7: + resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/d2d8db49943ccb201c1b1b283e9d0a630519fac7} name: summaly version: 4.0.2 dependencies: