Skip to content

Commit

Permalink
fix: Try new logo & better table styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mrv777 committed Oct 12, 2024
1 parent c09b744 commit a9d13bb
Show file tree
Hide file tree
Showing 23 changed files with 29 additions and 28 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
# - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
# - platform: 'ubuntu-22.04'
# args: ''
- platform: 'windows-latest'
args: ''
Expand All @@ -30,9 +30,7 @@ jobs:
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsoup-2.4-dev
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install pnpm
run: npm install -g pnpm
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bithive",
"version": "0.1.3",
"version": "0.1.4",
"private": true,
"author": {
"name": "MrV",
Expand Down
Binary file modified src-tauri/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square71x71Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square89x89Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/icon.icns
Binary file not shown.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "BitHive",
"version": "0.1.3"
"version": "0.1.4"
},
"tauri": {
"allowlist": {
Expand Down
11 changes: 5 additions & 6 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use client";

import React, { useEffect, useState } from 'react';
import Image from 'next/image';
import logo from '../images/logo.png';

const themes = [
"dark", "light", "cupcake", "bumblebee", "emerald", "corporate", "synthwave",
Expand Down Expand Up @@ -56,13 +58,10 @@ const Header: React.FC<HeaderProps> = () => {
};

return (
<header className="navbar bg-base-300 shadow-lg mb-4">
<header className="navbar bg-base-300 shadow-lg">
<div className="flex-1">
<a className="btn btn-ghost normal-case text-xl">
<span className="hidden sm:inline">BitHive</span>
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6 sm:hidden" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
<a className="btn btn-ghost">
<Image src={logo} alt="BitHive Logo" className="h-11 w-11" />
</a>
</div>
<div className="flex-none gap-2">
Expand Down
30 changes: 17 additions & 13 deletions src/components/HiveDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const HiveDashboard: React.FC = () => {
frequency: true,
voltage: true,
power: true,
delete: true,
actions: true,
});

const toggleColumn = (column: keyof typeof visibleColumns) => {
Expand Down Expand Up @@ -199,7 +199,7 @@ const HiveDashboard: React.FC = () => {
<p>Waiting for data from all miners...</p>
</div>
)}
<div className="divider" />
<div className="flex mt-2 gap-2">
<div className="flex justify-start">
<div className="dropdown mb-4">
<label tabIndex={0} className="btn m-1">
Expand All @@ -211,22 +211,26 @@ const HiveDashboard: React.FC = () => {
>
{Object.entries(visibleColumns).map(([column, isVisible]) => (
<li key={column}>
<label className="label cursor-pointer">
<span className="label-text capitalize">{column}</span>
<input
type="checkbox"
checked={isVisible}
onChange={() => {
toggleColumn(column as keyof typeof visibleColumns);
}}
className="checkbox"
/>
</label>
{column !== 'actions' ? (
<label className="label cursor-pointer">
<span className="label-text capitalize">{column}</span>
<input
type="checkbox"
checked={isVisible}
onChange={() => {
toggleColumn(column as keyof typeof visibleColumns);
}}
className="checkbox"
/>
</label>
) : null}
</li>
))}
</ul>
</div>
</div>
<div className="divider flex-grow" />
</div>

<MinerTable
statusQueries={statusQueries}
Expand Down
6 changes: 3 additions & 3 deletions src/components/MinerTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface MinerTableProps {
frequency: boolean;
voltage: boolean;
power: boolean;
delete: boolean;
actions: boolean;
};
removeFromHive: (ip: string) => void;
devicesWithData: number;
Expand Down Expand Up @@ -87,7 +87,7 @@ const MinerTable: React.FC<MinerTableProps> = ({
<SortableHeader column="frequency" label="Frequency" />
<SortableHeader column="voltage" label="Voltage" />
<SortableHeader column="power" label="Power" />
<th className={visibleColumns.delete ? "" : "hidden"}>Actions</th>
<th className={visibleColumns.actions ? "" : "hidden"}>Actions</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -187,7 +187,7 @@ const MinerTable: React.FC<MinerTableProps> = ({
</>
: "N/A"}
</td>
<td className={visibleColumns.delete ? "" : "hidden"}>
<td className={visibleColumns.actions ? "" : "hidden"}>
<button
onClick={() => {
removeFromHive(ip);
Expand Down
Binary file added src/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a9d13bb

Please sign in to comment.