Skip to content
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
16 changes: 8 additions & 8 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"daisyui": "^5.0.17",
"daisyui": "^5.0.18",
"tailwindcss": "^4.1.3",
"typescript": "^5.8.3",
"vite": "^6.2.5"
"vite": "^6.2.6"
}
}
4 changes: 2 additions & 2 deletions src-tauri/Cargo.lock

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

11 changes: 2 additions & 9 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
import { useState } from "react";
import { useStore } from "../store";
import { IconCommandLine } from ".";

export function Footer() {
const [collapsed, setCollapsed] = useState(true as boolean);

const appVersion = useStore((s) => s.appVersion);
const platformArch = useStore((s) => s.platformArch);
const consoleLines = useStore((s) => s.consoleLines);

return (
<footer
tabIndex={0}
className="collapse-arrow collapse bg-base-200 text-base-content/30 border-t border-base-300 rounded-none"
className="collapse collapse-arrow bg-base-200 text-base-content/30 border-t border-base-300 rounded-none"
>
<input
type="checkbox"
checked={!collapsed}
onChange={() => setCollapsed(!collapsed)}
/>
<input type="checkbox" />
<div className="collapse-title flex w-full items-center">
<IconCommandLine />
<div className="mx-auto flex gap-x-4 text-sm">
Expand Down
11 changes: 6 additions & 5 deletions src/pages/Networks.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useRef, useState } from "react";
import * as log from "@tauri-apps/plugin-log";
import * as path from "@tauri-apps/api/path";
import { exists, mkdir } from "@tauri-apps/plugin-fs";
Expand All @@ -14,6 +14,7 @@ import {
} from "../utils";

export function Networks() {
const isStoppingRef = useRef(false);
const [dlProgress, setDlProgress] = useState(0);
const [networkId, setNetworkId] = useState("");

Expand Down Expand Up @@ -52,9 +53,9 @@ export function Networks() {

async function disconnect() {
try {
isStoppingRef.current = true;
await clientStop();
setMessage("info", "Disconnected from Network");
consoleAddLine(`Disconnected from network: ${networkId}`);
} catch (error: any) {
log.error(`${error}`);
setMessage("error", `${error}`);
Expand Down Expand Up @@ -161,13 +162,13 @@ export function Networks() {
log.debug(`spawning command: ${cmd} ${args.join(" ")}`);

command.on("close", (data) => {
// normal: code=null signal=9
// error: code=2 signal=null
log.debug(`closed: ${cmd} code=${data.code} signal=${data.signal}`);
if (data.code !== null) {
if (!isStoppingRef.current) {
setMessage("error", "Error: Network connection failed.");
consoleAddLine(`Network connection failed: ${networkId}`);
}
isStoppingRef.current = false;
consoleAddLine(`Disconnected from network: ${networkId}`);
setClientPid(0);
setIsConnected(false);
setNetworkConnected("");
Expand Down