From fda2c88752644dfec45ebbcf92e3d68788fc2492 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 15 Dec 2023 02:17:43 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EB=A5=BC=20=EC=83=88=EB=A1=9C=20=EB=B6=88=EB=9F=AC?= =?UTF-8?q?=EC=98=A4=EC=A7=80=20=EC=95=8A=EA=B3=A0=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EB=A5=BC=20=EA=B0=B1?= =?UTF-8?q?=EC=8B=A0=ED=95=A0=20=EC=88=98=20=EC=9E=88=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 1 + .../src/components/global/MkPageHeader.vue | 4 ++++ packages/frontend/src/pages/notifications.vue | 16 ++++++++++++++-- packages/frontend/src/ui/friendly.vue | 2 +- .../frontend/src/ui/friendly/notifications.vue | 12 ++++++++++++ 5 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 packages/frontend/src/ui/friendly/notifications.vue diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 416270d49c..25528626a1 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -57,6 +57,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE - 기존 데이터 절약 모드 설정이 재설정됩니다. - Enhance: 컴포넌트만 새로 고쳐도 적용할 수 있는 설정은 페이지를 새로 고치지 않고 설정을 반영함 - 각 기능이 적용되는 컴포넌트(타임라인, 알림)에 따라 해당 컴포넌트만 새로 로드됩니다. +- Enhance: 페이지를 새로 불러오지 않고 알림 컴포넌트를 갱신할 수 있음 - Fix: '모달 배경색 제거' 옵션이 이모지 피커에 반영되지 않음 - Fix: 열람 주의로 설정된 노트의 리액션이 '더 보기'를 눌러야 표시됨 - Fix: 채널 이름이 긴 경우 게시 양식 표시가 깨지는 문제 (misskey-dev/misskey#12524) diff --git a/packages/frontend/src/components/global/MkPageHeader.vue b/packages/frontend/src/components/global/MkPageHeader.vue index b2916b6ff4..579735a3a3 100644 --- a/packages/frontend/src/components/global/MkPageHeader.vue +++ b/packages/frontend/src/components/global/MkPageHeader.vue @@ -15,8 +15,12 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
+
+
diff --git a/packages/frontend/src/pages/notifications.vue b/packages/frontend/src/pages/notifications.vue index 4f4663ecc2..908f95a21d 100644 --- a/packages/frontend/src/pages/notifications.vue +++ b/packages/frontend/src/pages/notifications.vue @@ -28,10 +28,16 @@ import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; import { notificationTypes } from '@/const.js'; +import { deviceKind } from '@/scripts/device-kind.js'; +import { globalEvents } from '@/events.js'; const tab = ref('all'); const includeTypes = ref(null); -const excludeTypes = computed(() => includeTypes.value ? notificationTypes.filter(t => !includeTypes.value.includes(t)) : null); +const excludeTypes = computed(() => includeTypes.value ? notificationTypes.filter(t => !includeTypes.value.includes(t)) : undefined); + +const props = defineProps<{ + disableRefreshButton?: boolean; +}>(); const mentionsPagination = { endpoint: 'notes/mentions' as const, @@ -64,7 +70,13 @@ function setFilter(ev) { os.popupMenu(items, ev.currentTarget ?? ev.target); } -const headerActions = computed(() => [tab.value === 'all' ? { +const headerActions = computed(() => [deviceKind === 'desktop' && !props.disableRefreshButton ? { + icon: 'ti ti-refresh', + text: i18n.ts.reload, + handler: (ev: Event) => { + globalEvents.emit('reloadNotification'); + }, +} : undefined, tab.value === 'all' ? { text: i18n.ts.filter, icon: 'ti ti-filter', highlighted: includeTypes.value != null, diff --git a/packages/frontend/src/ui/friendly.vue b/packages/frontend/src/ui/friendly.vue index db31915aed..a18c27d5fa 100644 --- a/packages/frontend/src/ui/friendly.vue +++ b/packages/frontend/src/ui/friendly.vue @@ -126,7 +126,7 @@ import { globalEvents } from '@/events.js'; import CPAvatar from '@/components/global/CPAvatar-Friendly.vue'; const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue')); -const XNotifications = defineAsyncComponent(() => import('@/pages/notifications.vue')); +const XNotifications = defineAsyncComponent(() => import('@/ui/friendly/notifications.vue')); const XSidebar = defineAsyncComponent(() => import('@/ui/friendly/navbar.vue')); const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue')); const XAnnouncements = defineAsyncComponent(() => import('@/ui/_common_/announcements.vue')); diff --git a/packages/frontend/src/ui/friendly/notifications.vue b/packages/frontend/src/ui/friendly/notifications.vue new file mode 100644 index 0000000000..a2b215a3ff --- /dev/null +++ b/packages/frontend/src/ui/friendly/notifications.vue @@ -0,0 +1,12 @@ + + + + +