From 6b676a928d3e167c98f2a1854a432adf5c125d65 Mon Sep 17 00:00:00 2001 From: yupix Date: Sun, 10 Mar 2024 17:31:39 +0900 Subject: [PATCH 1/5] =?UTF-8?q?enhance(backend):=20antennas/update?= =?UTF-8?q?=E3=81=AE=E5=BF=85=E9=A0=88=E9=A0=85=E7=9B=AE=E3=82=92antennaId?= =?UTF-8?q?=E3=81=AE=E3=81=BF=E3=81=AB=20(#13542)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: antennas/updateの必須項目を最小限に * fix: userListIdがnullにできない --- CHANGELOG.md | 2 +- .../server/api/endpoints/antennas/update.ts | 12 +++++++----- packages/misskey-js/src/autogen/types.ts | 18 +++++++++--------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be621e1ebd..8c5f05dbe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ - Fix: カスタム絵文字の画像読み込みに失敗した際はテキストではなくダミー画像を表示 #13487 ### Server -- +- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに ## 2024.3.0 diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index 459729f61f..76a34924a0 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -67,7 +67,7 @@ export const paramDef = { withFile: { type: 'boolean' }, notify: { type: 'boolean' }, }, - required: ['antennaId', 'name', 'src', 'keywords', 'excludeKeywords', 'users', 'caseSensitive', 'withReplies', 'withFile', 'notify'], + required: ['antennaId'], } as const; @Injectable() @@ -83,8 +83,10 @@ export default class extends Endpoint { // eslint- private globalEventService: GlobalEventService, ) { super(meta, paramDef, async (ps, me) => { - if (ps.keywords.flat().every(x => x === '') && ps.excludeKeywords.flat().every(x => x === '')) { - throw new Error('either keywords or excludeKeywords is required.'); + if (ps.keywords && ps.excludeKeywords) { + if (ps.keywords.flat().every(x => x === '') && ps.excludeKeywords.flat().every(x => x === '')) { + throw new Error('either keywords or excludeKeywords is required.'); + } } // Fetch the antenna const antenna = await this.antennasRepository.findOneBy({ @@ -98,7 +100,7 @@ export default class extends Endpoint { // eslint- let userList; - if (ps.src === 'list' && ps.userListId) { + if ((ps.src === 'list' || antenna.src === 'list') && ps.userListId) { userList = await this.userListsRepository.findOneBy({ id: ps.userListId, userId: me.id, @@ -112,7 +114,7 @@ export default class extends Endpoint { // eslint- await this.antennasRepository.update(antenna.id, { name: ps.name, src: ps.src, - userListId: userList ? userList.id : null, + userListId: ps.userListId !== undefined ? userList ? userList.id : null : undefined, keywords: ps.keywords, excludeKeywords: ps.excludeKeywords, users: ps.users, diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 41c3f50135..be3e86bd78 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -9925,19 +9925,19 @@ export type operations = { 'application/json': { /** Format: misskey:id */ antennaId: string; - name: string; + name?: string; /** @enum {string} */ - src: 'home' | 'all' | 'users' | 'list' | 'users_blacklist'; + src?: 'home' | 'all' | 'users' | 'list' | 'users_blacklist'; /** Format: misskey:id */ userListId?: string | null; - keywords: string[][]; - excludeKeywords: string[][]; - users: string[]; - caseSensitive: boolean; + keywords?: string[][]; + excludeKeywords?: string[][]; + users?: string[]; + caseSensitive?: boolean; localOnly?: boolean; - withReplies: boolean; - withFile: boolean; - notify: boolean; + withReplies?: boolean; + withFile?: boolean; + notify?: boolean; }; }; }; From e23e2f4ae9368754e4eadcd0afaa2bb1f984ba6a 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: Tue, 12 Mar 2024 12:09:26 +0900 Subject: [PATCH 2/5] Fix Changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c5f05dbe5..9c2a32aa56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Fix: 周年の実績が閏年を考慮しない問題を修正 ### Server -- +- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに ## 2024.3.1 @@ -26,7 +26,7 @@ - Fix: カスタム絵文字の画像読み込みに失敗した際はテキストではなくダミー画像を表示 #13487 ### Server -- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに +- ## 2024.3.0 From b280faa8e72c29036ef65af7fd8949538ab43dbd 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: Tue, 12 Mar 2024 13:48:14 +0900 Subject: [PATCH 3/5] =?UTF-8?q?enhance(frontend):=20=E5=90=84=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=90=E3=83=BC=E3=81=AFMisskey=E3=82=92=E5=88=A9?= =?UTF-8?q?=E7=94=A8=E3=81=97=E3=81=9F=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9?= =?UTF-8?q?=E3=81=A7=E3=81=82=E3=82=8B=E3=81=93=E3=81=A8=E3=82=92=E5=BC=B7?= =?UTF-8?q?=E8=AA=BF=20(#13559)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ロゴ周りを追加 * 調整 --------- Co-authored-by: uboar <10250330+uboar@users.noreply.github.com> --- .../frontend/src/pages/welcome.entrance.a.vue | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/packages/frontend/src/pages/welcome.entrance.a.vue b/packages/frontend/src/pages/welcome.entrance.a.vue index 89bb010dd6..6c05aad24f 100644 --- a/packages/frontend/src/pages/welcome.entrance.a.vue +++ b/packages/frontend/src/pages/welcome.entrance.a.vue @@ -9,7 +9,10 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
+
Powered by
+ +
@@ -113,14 +116,24 @@ misskeyApiGet('federation/instances', { opacity: 0.5; } - > .misskey { + > .logo-wrapper { position: fixed; - top: 42px; - left: 42px; - width: 140px; + top: 36px; + left: 36px; + flex: auto; + color: #fff; + user-select: none; + pointer-events: none; - @media (max-width: 450px) { - width: 130px; + > .powered-by { + margin-bottom: 2px; + } + + > .misskey { + width: 140px; + @media (max-width: 450px) { + width: 130px; + } } } From 6d9c234cb6d3ddfaa3266255e7c305b329a556b6 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Tue, 12 Mar 2024 13:50:24 +0900 Subject: [PATCH 4/5] fix: URL preview popup for local URL appears in the upper left corner (#13555) --- CHANGELOG.md | 1 + packages/frontend/src/components/MkLink.vue | 4 ++-- packages/frontend/src/components/global/MkA.vue | 8 ++++++-- packages/frontend/src/components/global/MkUrl.vue | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c2a32aa56..83d0a3f7d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように - Fix: 一部のページ内リンクが正しく動作しない問題を修正 - Fix: 周年の実績が閏年を考慮しない問題を修正 +- Fix: ローカルURLのプレビューポップアップが左上に表示される ### Server - Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに diff --git a/packages/frontend/src/components/MkLink.vue b/packages/frontend/src/components/MkLink.vue index a5abbeceac..3f7aba2fe4 100644 --- a/packages/frontend/src/components/MkLink.vue +++ b/packages/frontend/src/components/MkLink.vue @@ -29,13 +29,13 @@ const self = props.url.startsWith(local); const attr = self ? 'to' : 'href'; const target = self ? null : '_blank'; -const el = ref(); +const el = ref(); useTooltip(el, (showing) => { os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), { showing, url: props.url, - source: el.value, + source: el.value instanceof HTMLElement ? el.value : el.value?.$el, }, {}, 'closed'); }); diff --git a/packages/frontend/src/components/global/MkA.vue b/packages/frontend/src/components/global/MkA.vue index 61d7ac17d9..1ba7cb2022 100644 --- a/packages/frontend/src/components/global/MkA.vue +++ b/packages/frontend/src/components/global/MkA.vue @@ -4,13 +4,13 @@ SPDX-License-Identifier: AGPL-3.0-only -->