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
14 changes: 14 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ tasks:
WCLOUD_WS_ENDPOINT: "wss://wsapi-dev.waveterm.dev/"
WAVETERM_NOCONFIRMQUIT: "1"

preview:
desc: Run the standalone component preview server with HMR (no Electron, no backend).
dir: frontend/preview
cmd: npx vite
deps:
- npm:install

build:preview:
desc: Build the component preview server for static deployment.
dir: frontend/preview
cmd: npx vite build
deps:
- npm:install

electron:winquickdev:
desc: Run the Electron application via the Vite dev server (quick dev - Windows amd64 only, no generate, no wsh).
cmd: npm run dev
Expand Down
29 changes: 21 additions & 8 deletions frontend/app/modals/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ import { isDev } from "@/util/isdev";
import { useState } from "react";
import { getApi } from "../store/global";

interface AboutModalProps {}
interface AboutModalVProps {
versionString: string;
updaterChannel: string;
onClose: () => void;
}

const AboutModal = ({}: AboutModalProps) => {
const AboutModalV = ({ versionString, updaterChannel, onClose }: AboutModalVProps) => {
const currentDate = new Date();
const [details] = useState(() => getApi().getAboutModalDetails());
const [updaterChannel] = useState(() => getApi().getUpdaterChannel());

return (
<Modal className="pt-[34px] pb-[34px]" onClose={() => modalsModel.popModal()}>
<Modal className="pt-[34px] pb-[34px]" onClose={onClose}>
<div className="flex flex-col gap-[26px] w-full">
<div className="flex flex-col items-center justify-center gap-4 self-stretch w-full text-center">
<Logo />
Expand All @@ -29,8 +31,7 @@ const AboutModal = ({}: AboutModalProps) => {
</div>
</div>
<div className="items-center gap-4 self-stretch w-full text-center">
Client Version {details.version} ({isDev() ? "dev-" : ""}
{details.buildTime})
Client Version {versionString}
<br />
Update Channel: {updaterChannel}
</div>
Expand Down Expand Up @@ -68,6 +69,18 @@ const AboutModal = ({}: AboutModalProps) => {
);
};

AboutModalV.displayName = "AboutModalV";

interface AboutModalProps {}

const AboutModal = ({}: AboutModalProps) => {
Comment on lines +74 to +76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove empty props interface and empty destructuring.

The empty interface and {} pattern trigger lint errors; a no-props component is clearer and lint-safe.

♻️ Suggested fix
-interface AboutModalProps {}
-
-const AboutModal = ({}: AboutModalProps) => {
+const AboutModal = () => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
interface AboutModalProps {}
const AboutModal = ({}: AboutModalProps) => {
const AboutModal = () => {
🧰 Tools
🪛 Biome (2.4.4)

[error] 74-74: An empty interface is equivalent to {}.

(lint/suspicious/noEmptyInterface)


[error] 76-76: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/app/modals/about.tsx` around lines 74 - 76, Remove the unused
AboutModalProps interface and the empty destructured parameter in the AboutModal
component signature: change the component to a no-props declaration (e.g., use
AboutModal() or const AboutModal = () => ...) and delete the AboutModalProps
interface and the "{}: AboutModalProps" portion so lint errors for unused/empty
props are resolved.

const [details] = useState(() => getApi().getAboutModalDetails());
const [updaterChannel] = useState(() => getApi().getUpdaterChannel());
const versionString = `${details.version} (${isDev() ? "dev-" : ""}${details.buildTime})`;

return <AboutModalV versionString={versionString} updaterChannel={updaterChannel} onClose={() => modalsModel.popModal()} />;
};

AboutModal.displayName = "AboutModal";

export { AboutModal };
export { AboutModal, AboutModalV };
Loading
Loading