Revert "enhance(client): cpu-memメトリクスウィジェットの色変更"

This reverts commit a27c3e2a
This commit is contained in:
NoriDev 2023-06-14 23:51:16 +09:00
parent 245ec7a68a
commit bbca11cc60
2 changed files with 3 additions and 39 deletions

View file

@ -56,7 +56,6 @@
- 더 보기! 메뉴에 도움말 추가
- 노트를 자세히 볼 때 역할 배지를 표시하도록
- 일부 제어판 페이지의 헤더 개선
- cpu-mem 통계 위젯의 색상 변경
- MkImgWithBlurhash에서 blurhash 그리기에 사용하는 canvas는 재사용하도록([misskey-dev#10966](https://github.com/misskey-dev/misskey/pull/10966))
- CherryPick 고유 기능 및 개선된 기능은 [CherryPick] 배지 추가
- Fix: (Friendly) 플로팅 메뉴를 길게 눌렀을 때 프로필 이미지를 드래그 할 수 있는 문제

View file

@ -3,19 +3,8 @@
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
<defs>
<linearGradient :id="cpuGradientId" x1="0" x2="0" y1="1" y2="0">
<!--
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
<stop offset="100%" stop-color="hsl(0, 80%, 70%)"></stop>
-->
<stop offset="0%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 0%)"></stop>
<stop offset="12.5%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 12.5%)"></stop>
<stop offset="25%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 25%)"></stop>
<stop offset="37.5%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 37.5%)"></stop>
<stop offset="50%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 50%)"></stop>
<stop offset="62.5%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 62.5%)"></stop>
<stop offset="75%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 75%)"></stop>
<stop offset="87.5%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 87.5%)"></stop>
<stop offset="100%" stop-color="color-mix(in oklch decreasing hue, #b1ddff, #ffbcdc 100%)"></stop>
</linearGradient>
<mask :id="cpuMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
<polygon
@ -47,19 +36,8 @@
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
<defs>
<linearGradient :id="memGradientId" x1="0" x2="0" y1="1" y2="0">
<!--
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
<stop offset="100%" stop-color="hsl(0, 80%, 70%)"></stop>
-->
<stop offset="0%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 0%)"></stop>
<stop offset="12.5%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 12.5%)"></stop>
<stop offset="25%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 25%)"></stop>
<stop offset="37.5%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 37.5%)"></stop>
<stop offset="50%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 50%)"></stop>
<stop offset="62.5%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 62.5%)"></stop>
<stop offset="75%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 75%)"></stop>
<stop offset="87.5%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 87.5%)"></stop>
<stop offset="100%" stop-color="color-mix(in oklch decreasing hue, #15c5cd, #f38c8d 100%)"></stop>
</linearGradient>
<mask :id="memMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
<polygon
@ -95,23 +73,14 @@
import { onMounted, onBeforeUnmount } from 'vue';
import { v4 as uuid } from 'uuid';
type Stat = {
cpu: number;
mem: {
active: number;
};
};
const props = withDefaults(defineProps<{
stats?: Stat[]
const props = defineProps<{
connection: any,
meta: any
}>(), {
stats: () => [] as Stat[],
});
}>();
let viewBoxX: number = $ref(50);
let viewBoxY: number = $ref(30);
let stats: Stat[] = $ref(props.stats);
let stats: any[] = $ref([]);
const cpuGradientId = uuid();
const cpuMaskId = uuid();
const memGradientId = uuid();
@ -166,10 +135,6 @@ function onStatsLog(statsLog) {
onStats(revStats);
}
}
if (stats.length) {
onStatsLog(stats.splice(0, stats.length).reverse());
}
</script>
<style lang="scss" scoped>