From 9ad250bbb85349ddf8a89c3c6beadcabe3fb71e8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 16 Apr 2023 07:59:23 +0900 Subject: [PATCH 1/5] enhance(frontend): improve MkPostForm behaviour --- packages/frontend/src/components/MkPostForm.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 6f7db13e30..c65cb7d6e5 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -247,6 +247,10 @@ watch($$(text), () => { checkMissingMention(); }, { immediate: true }); +watch($$(visibility), () => { + checkMissingMention(); +}, { immediate: true }); + watch($$(visibleUsers), () => { checkMissingMention(); }, { From 0ddc79bb9127eb6de0ba5110329bf15a506a6540 Mon Sep 17 00:00:00 2001 From: Nanashia Date: Sun, 16 Apr 2023 15:23:49 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix(backend):=20=E3=82=A2=E3=83=90=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=81=A8=E3=83=90=E3=83=8A=E3=83=BC=E3=81=8C=E3=83=AA?= =?UTF-8?q?=E3=82=BB=E3=83=83=E3=83=88=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84?= =?UTF-8?q?=20(#10643)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend): avatar and banner couldn't be reset * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/backend/src/server/api/endpoints/i/update.ts | 8 ++++++++ packages/backend/test/e2e/users.ts | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index deb5b3e978..d0c662a54b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ ### Server - Fix: エクスポートデータの拡張子がunknownになる問題を修正 - Fix: Content-Dispositionのパースでエラーが発生した場合にダウンロードが完了しない問題を修正 +- Fix: API: i/update avatarIdとbannerIdにnullを渡した時、画像がリセットされない問題を修正 ## 13.11.3 diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index be1c72b207..97699f3bef 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -221,6 +221,10 @@ export default class extends Endpoint { updates.avatarId = avatar.id; updates.avatarUrl = this.driveFileEntityService.getPublicUrl(avatar, 'avatar'); updates.avatarBlurhash = avatar.blurhash; + } else if (ps.avatarId === null) { + updates.avatarId = null; + updates.avatarUrl = null; + updates.avatarBlurhash = null; } if (ps.bannerId) { @@ -232,6 +236,10 @@ export default class extends Endpoint { updates.bannerId = banner.id; updates.bannerUrl = this.driveFileEntityService.getPublicUrl(banner); updates.bannerBlurhash = banner.blurhash; + } else if (ps.bannerId === null) { + updates.bannerId = null; + updates.bannerUrl = null; + updates.bannerBlurhash = null; } if (ps.pinnedPageId) { diff --git a/packages/backend/test/e2e/users.ts b/packages/backend/test/e2e/users.ts index 444fb284b3..2c4716c060 100644 --- a/packages/backend/test/e2e/users.ts +++ b/packages/backend/test/e2e/users.ts @@ -508,7 +508,6 @@ describe('ユーザー', () => { }; assert.deepStrictEqual(response, expected, inspect(parameters)); - if (1) return; // BUG 521eb95 以降アバターのリセットができない。 const parameters2 = { avatarId: null }; const response2 = await successfulApiCall({ endpoint: 'i/update', parameters: parameters2, user: alice }); const expected2 = { @@ -534,7 +533,6 @@ describe('ユーザー', () => { }; assert.deepStrictEqual(response, expected, inspect(parameters)); - if (1) return; // BUG 521eb95 以降バナーのリセットができない。 const parameters2 = { bannerId: null }; const response2 = await successfulApiCall({ endpoint: 'i/update', parameters: parameters2, user: alice }); const expected2 = { From d2d17847dca478e74f1cd52012347eaf35d31669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sun, 16 Apr 2023 11:00:07 +0000 Subject: [PATCH 3/5] ci: fix story impl files were ignored --- packages/frontend/.storybook/changes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/.storybook/changes.ts b/packages/frontend/.storybook/changes.ts index f0827331f7..755bec6869 100644 --- a/packages/frontend/.storybook/changes.ts +++ b/packages/frontend/.storybook/changes.ts @@ -38,6 +38,7 @@ fs.readFile( path.resolve(__dirname, '../../..', arg) ) ) + .map((path) => path.replace(/(?:(?<=\.stories)\.(?:impl|meta)|\.msw)(?=\.ts$)/g, '')) .map((path) => (path.startsWith('.') ? path : `./${path}`)) ); if ( From cc27c1486d47127c69057401ad5ce2f390a96b4e Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 17 Apr 2023 11:01:01 +0900 Subject: [PATCH 4/5] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0c662a54b..20a0881240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ --> ## 13.x.x (unreleased) +### NOTE +- Node.js 18.6.0以上が必要になりました + ### General - ユーザーへの自分用メモ機能 * ユーザーに対して、自分だけが見られるメモを追加できるようになりました。 From 614f12386e21c89adf7dbde5863e222c4fa73572 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 17 Apr 2023 13:12:58 +0900 Subject: [PATCH 5/5] =?UTF-8?q?feat(frontend):=20=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=9E=E3=82=A4=E3=82=BA=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + locales/ja-JP.yml | 9 ++ .../frontend/src/pages/settings/general.vue | 22 ++++ packages/frontend/src/store.ts | 8 ++ packages/frontend/src/ui/_common_/common.vue | 118 +++++++++++++----- 5 files changed, 129 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a0881240..edad9abc77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ (デスクトップ表示ではusernameの右側のボタンからも追加可能) ### Client +- 通知の表示をカスタマイズできるように - コントロールパネルのカスタム絵文字ページおよびaboutのカスタム絵文字の検索インプットで、`:emojiname1::emojiname2:`のように検索して絵文字を検索できるように * 絵文字ピッカーから入力可能になります - データセーバーモードを追加 diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ff0a2ac9f3..9a526e67e9 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1001,6 +1001,15 @@ accountMoved: "このユーザーは新しいアカウントに引っ越しま forceShowAds: "常に広告を表示する" addMemo: "メモを追加" editMemo: "メモを編集" +notificationDisplay: "通知の表示" +leftTop: "左上" +rightTop: "右上" +leftBottom: "左下" +rightBottom: "右下" +stackAxis: "スタック方向" +vertical: "縦" +horizontal: "横" +position: "位置" _accountMigration: moveTo: "このアカウントを新しいアカウントに引っ越す" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index a487a4622a..0a53ed2c8d 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -92,6 +92,26 @@ + + + +
+ + + + + + + + + + + + + +
+
+ {{ i18n.ts.aiChanMode }} @@ -181,6 +201,8 @@ const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter(' const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars')); const aiChanMode = computed(defaultStore.makeGetterSetter('aiChanMode')); const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('mediaListWithOneImageAppearance')); +const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition')); +const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); watch(lang, () => { miLocalStorage.setItem('lang', lang.value as string); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index a4f0f65e14..710b08d9e0 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -314,6 +314,14 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: 'expand' as 'expand' | '16_9' | '1_1' | '2_3', }, + notificationPosition: { + where: 'device', + default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom', + }, + notificationStackAxis: { + where: 'device', + default: 'horizontal' as 'vertical' | 'horizontal', + }, })); // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/frontend/src/ui/_common_/common.vue b/packages/frontend/src/ui/_common_/common.vue index 5a32c076a4..71a4285e9d 100644 --- a/packages/frontend/src/ui/_common_/common.vue +++ b/packages/frontend/src/ui/_common_/common.vue @@ -10,14 +10,16 @@ - +
+ +
@@ -30,7 +32,7 @@