From c8d0cecabd8fb52dc9a1d32943fd90ea158d0167 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Thu, 1 Jun 2023 15:47:36 +0900 Subject: [PATCH] =?UTF-8?q?feat(client):=20=E6=96=B0=E3=81=97=E3=81=84?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E3=83=A1=E3=83=88=E3=83=AA?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 1 + .../src/widgets/server-metric/cpu-mem-pie.vue | 69 +++++++++++++++++++ .../src/widgets/server-metric/index.vue | 12 ++-- .../src/widgets/server-metric/pie-compact.vue | 49 +++++++++++++ 4 files changed, 126 insertions(+), 5 deletions(-) create mode 100644 packages/frontend/src/widgets/server-metric/cpu-mem-pie.vue create mode 100644 packages/frontend/src/widgets/server-metric/pie-compact.vue diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 4fb6d4755b..72050c6b88 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -53,6 +53,7 @@ - 헤더에 뒤로 가기 버튼 추가 - 업데이트 팝업 개선 (Misskey와 CherryPick의 변경 사항을 직관적으로 볼 수 있도록) - 서버 통계 위젯의 원 그래프 디자인 개선 +- 새로운 서버 통계 위젯 추가 - Fix: (Friendly) 위젯 영역에 safe-area-inset-bottom이 적용되지 않음 - Fix: (Friendly) 플로팅 메뉴를 길게 눌렀을 때 프로필 이미지를 드래그 할 수 있는 문제 - Fix: 위젯 편집 시 헤더 이외의 영역을 눌렀을 때 위젯 설정이 뜨는 문제 diff --git a/packages/frontend/src/widgets/server-metric/cpu-mem-pie.vue b/packages/frontend/src/widgets/server-metric/cpu-mem-pie.vue new file mode 100644 index 0000000000..f16cb304bd --- /dev/null +++ b/packages/frontend/src/widgets/server-metric/cpu-mem-pie.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/packages/frontend/src/widgets/server-metric/index.vue b/packages/frontend/src/widgets/server-metric/index.vue index e019ff540b..46cb913898 100644 --- a/packages/frontend/src/widgets/server-metric/index.vue +++ b/packages/frontend/src/widgets/server-metric/index.vue @@ -6,10 +6,11 @@
- - - - + + + + +
@@ -18,6 +19,7 @@ import { onUnmounted, ref } from 'vue'; import { useWidgetPropsManager, Widget, WidgetComponentExpose } from '../widget'; import XCpuMemory from './cpu-mem.vue'; +import XCpuMemoryCompact from './cpu-mem-pie.vue'; import XNet from './net.vue'; import XCpu from './cpu.vue'; import XMemory from './mem.vue'; @@ -67,7 +69,7 @@ os.api('server-info', {}).then(res => { }); const toggleView = () => { - if (widgetProps.view === 4) { + if (widgetProps.view === 5) { widgetProps.view = 0; } else { widgetProps.view++; diff --git a/packages/frontend/src/widgets/server-metric/pie-compact.vue b/packages/frontend/src/widgets/server-metric/pie-compact.vue new file mode 100644 index 0000000000..0092e86cb9 --- /dev/null +++ b/packages/frontend/src/widgets/server-metric/pie-compact.vue @@ -0,0 +1,49 @@ + + + + +