Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fan control speed rounding, board model, bump deps #16

Merged
merged 3 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,269 changes: 1,013 additions & 1,256 deletions package-lock.json

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bmc-ui",
"version": "3.3.0",
"version": "3.3.1",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -12,55 +12,55 @@
},
"packageManager": "[email protected]",
"dependencies": {
"@fontsource/inter": "^5.0.18",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slider": "^1.1.2",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.0.7",
"@tanstack/react-query": "^5.45.0",
"@tanstack/react-router": "^1.36.3",
"@fontsource/inter": "^5.0.19",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-slider": "^1.2.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-tooltip": "^1.1.2",
"@tanstack/react-query": "^5.51.15",
"@tanstack/react-router": "^1.45.11",
"axios": "^1.7.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"filesize": "^10.1.2",
"i18next": "^23.11.5",
"filesize": "^10.1.4",
"i18next": "^23.12.2",
"i18next-browser-languagedetector": "^8.0.0",
"javascript-time-ago": "^2.5.10",
"lucide-react": "^0.394.0",
"lucide-react": "^0.416.0",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^14.1.2",
"tailwind-merge": "^2.3.0",
"react-i18next": "^15.0.0",
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
"vaul": "^0.9.1"
},
"devDependencies": {
"@tanstack/react-query-devtools": "^5.45.0",
"@tanstack/router-devtools": "^1.36.3",
"@tanstack/router-vite-plugin": "^1.37.0",
"@types/node": "^20.14.2",
"@tanstack/react-query-devtools": "^5.51.15",
"@tanstack/router-devtools": "^1.45.11",
"@tanstack/router-vite-plugin": "^1.45.8",
"@types/node": "^20.14.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-tailwindcss": "^3.17.3",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"vite": "^5.2.13",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-tailwindcss": "^3.17.4",
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"vite": "^5.3.5",
"vite-plugin-svgr": "^4.2.0"
}
}
1 change: 1 addition & 0 deletions src/components/skeletons/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default function AboutSkeleton() {
return (
<TabView>
<dl className="flex flex-col">
<TableItem term="Board model"><div className="h-6 w-48 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div></TableItem>
<TableItem term="Host name"><div className="h-6 w-48 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div></TableItem>
<TableItem term="Daemon version"><div className="h-6 w-48 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div></TableItem>
<TableItem term="Build time"><div className="h-6 w-48 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div>
Expand Down
10 changes: 6 additions & 4 deletions src/lib/api/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ interface PowerTabResponse {
}

interface AboutTabResponse {
api: string;
build_version: string;
buildroot: string;
buildtime: Date;
board_model: string;
board_revision: string;
hostname: string;
api: string;
version: string;
buildtime: Date;
buildroot: string;
build_version: string;
}

export interface FlashStatus {
Expand Down
1 change: 1 addition & 0 deletions src/locale/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const translations = {
successMessage: "Image erfolgreich auf den Knoten geflasht",
},
about: {
boardModel: "Board-Modell",
hostname: "Hostname",
daemonVersion: "Daemon-Version",
buildTime: "Build-Zeit",
Expand Down
1 change: 1 addition & 0 deletions src/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const translations = {
successMessage: "Image flashed successfully to the node",
},
about: {
boardModel: "Board model",
hostname: "Hostname",
daemonVersion: "Daemon version",
buildTime: "Build time",
Expand Down
1 change: 1 addition & 0 deletions src/locale/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const translations = {
successMessage: "Imagen flasheada con éxito al nodo",
},
about: {
boardModel: "Modelo de placa",
hostname: "Nombre de host",
daemonVersion: "Versión del daemon",
buildTime: "Fecha de compilación",
Expand Down
1 change: 1 addition & 0 deletions src/locale/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const translations = {
successMessage: "Image succesvol geflasht naar de node",
},
about: {
boardModel: "Boardmodel",
hostname: "Hostnaam",
daemonVersion: "Daemonversie",
buildTime: "Buildtijd",
Expand Down
1 change: 1 addition & 0 deletions src/locale/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const translations = {
successMessage: "Obraz został pomyślnie sflashowany na węźle",
},
about: {
boardModel: "Model płyty",
hostname: "Nazwa hosta",
daemonVersion: "Wersja demona",
buildTime: "Czas kompilacji",
Expand Down
1 change: 1 addition & 0 deletions src/locale/zh-Hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const translations = {
successMessage: "镜像已成功刷写到节点。",
},
about: {
boardModel: "主板型号",
hostname: "主机名",
daemonVersion: "守护进程版本",
buildTime: "构建时间",
Expand Down
3 changes: 3 additions & 0 deletions src/routes/_tabLayout/about.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ function About() {
return (
<TabView>
<dl className="flex flex-col">
<TableItem term={t("about.boardModel")}>
{data.board_model} (v{data.board_revision})
</TableItem>
<TableItem term={t("about.hostname")}>{data.hostname}</TableItem>
<TableItem
term={t("about.daemonVersion")}
Expand Down
8 changes: 5 additions & 3 deletions src/routes/_tabLayout/info.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,11 @@ function Info() {
}
/>
<div className="flex w-1/5 justify-end font-semibold lg:w-1/12">
{(coolingDeviceSpeeds[coolingDevice.device] /
coolingDevice.max_speed) *
100}
{Math.round(
(coolingDeviceSpeeds[coolingDevice.device] /
coolingDevice.max_speed) *
100
)}
%
</div>
</div>
Expand Down