Skip to content

Commit

Permalink
Merge branch 'release/0.2.x' of https://github.com/shm11C3/hardware-m…
Browse files Browse the repository at this point in the history
…onitor into develop
  • Loading branch information
shm11C3 committed Dec 21, 2024
2 parents 1ec2193 + 1be544e commit 7160af3
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
branches:
- master
- develop
- release/**
push:
branches:
- develop
- release/**

jobs:
test-tauri:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- release/**

# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lto = true

[package]
name = "hardware_visualizer"
version = "0.2.0"
version = "0.2.1"
description = "A real-time hardware monitoring tool for Windows"
authors = ["@shm11C3"]
license = ""
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"productName": "HardwareVisualizer",
"mainBinaryName": "hardware-visualizer",
"version": "0.2.0",
"version": "0.2.1",
"identifier": "HardwareVisualizer",
"plugins": {},
"app": {
Expand Down
9 changes: 8 additions & 1 deletion src/components/charts/DoughnutChart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useSettingsAtom } from "@/atom/useSettingsAtom";
import { type ChartConfig, ChartContainer } from "@/components/ui/chart";
import { Skeleton } from "@/components/ui/skeleton";
import { minOpacity } from "@/consts";
import type { HardwareDataType } from "@/types/hardwareDataType";
import { Lightning, Speedometer, Thermometer } from "@phosphor-icons/react";
import type { JSX } from "react";
Expand Down Expand Up @@ -76,7 +77,13 @@ export const DoughnutChart = ({
stroke="none"
className="first:fill-zinc-300 dark:first:fill-muted last:fill-zinc-200 last:dark:fill-gray-900"
style={{
opacity: (1 - settings.backgroundImgOpacity / 100) ** 2,
opacity:
settings.selectedBackgroundImg != null
? Math.max(
(1 - settings.backgroundImgOpacity / 100) ** 2,
minOpacity,
)
: 1,
}}
polarRadius={[70, 60]}
/>
Expand Down
9 changes: 8 additions & 1 deletion src/components/charts/ProcessTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { minOpacity } from "@/consts";
import { useTauriDialog } from "@/hooks/useTauriDialog";
import { type ProcessInfo, commands } from "@/rspc/bindings";
import { ArrowsOut, CaretDown, CaretUp } from "@phosphor-icons/react";
Expand Down Expand Up @@ -101,7 +102,13 @@ export const ProcessesTable = () => {
<div
className="p-4 border rounded-md shadow-md bg-zinc-300 dark:bg-gray-800 dark:text-whit"
style={{
opacity: (1 - settings.backgroundImgOpacity / 100) ** 2,
opacity:
settings.selectedBackgroundImg != null
? Math.max(
(1 - settings.backgroundImgOpacity / 100) ** 2,
minOpacity,
)
: 1,
}}
>
<Dialog>
Expand Down
2 changes: 2 additions & 0 deletions src/consts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./chart";
export * from "./style";
1 change: 1 addition & 0 deletions src/consts/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const minOpacity = 0.5;
9 changes: 8 additions & 1 deletion src/template/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from "@/components/charts/Bar";
import { DoughnutChart } from "@/components/charts/DoughnutChart";
import { ProcessesTable } from "@/components/charts/ProcessTable";
import { minOpacity } from "@/consts";
import type { StorageInfo } from "@/rspc/bindings";
import type { NameValues } from "@/types/hardwareDataType";
import { useAtom } from "jotai";
Expand All @@ -25,7 +26,13 @@ const InfoTable = ({ data }: { data: { [key: string]: string | number } }) => {
<div
className="px-4 pt-2 pb-4 border rounded-md shadow-md bg-zinc-300 dark:bg-gray-800 dark:text-white"
style={{
opacity: (1 - settings.backgroundImgOpacity / 100) ** 2,
opacity:
settings.selectedBackgroundImg != null
? Math.max(
(1 - settings.backgroundImgOpacity / 100) ** 2,
minOpacity,
)
: 1,
}}
>
<table className="w-full text-left">
Expand Down

0 comments on commit 7160af3

Please sign in to comment.