Show the app version in the status bar

未关闭 适合新手
#40 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
electron, react, typescript
领域
desktop, frontend

调研方向

从主机信息的 IPC 路径开始:src/main/ipc.ts 和 src/shared/ipc.ts 定义了调用,src/preload/index.ts 将其暴露给渲染进程。在那里添加 app.getVersion(),然后先在 src/renderer/src/components/StatusBar.tsx 中渲染它,并从 src/renderer/src/mockApi.ts 返回一个假值。完成标准是:npm run typecheck 通过,npm run dev:web 显示版本号,并且 bug 报告模板要求用户从状态栏复制它。

由索引模型根据 Issue 内容生成。

描述

first issue ui

Bug reports need the app version, and right now you have to dig in Settings > Apps for it.

Expected

The status bar shows v0.1.0 at the far left, before the QEMU version, in the same muted style.

Acceptance criteria

  • main sends app.getVersion() to the renderer (add it to the existing host info call if that's simplest)
  • StatusBar.tsx shows it first
  • the browser mock (src/renderer/src/mockApi.ts) returns a fake version so npm run dev:web still works
  • the bug report form (.github/ISSUE_TEMPLATE/bug_report.yml) says to copy it from the status bar

Files

  • src/main/ipc.ts, src/preload/index.ts, src/shared/ipc.ts
  • src/renderer/src/components/StatusBar.tsx, src/renderer/src/mockApi.ts

Getting set up

  1. Fork and clone, then npm install and npx install-electron --no (full steps in CONTRIBUTING.md)
  2. npm run dev:web shows the UI in a browser with a fake backend, no QEMU needed. npm run dev runs the real app
  3. Before the PR: npm run typecheck and npm test

Comment here if you want to take it, so nobody doubles up. Ask anything in this issue and I will answer here, usually within a few days.

主要语言
TypeScript
星标
3
派生
0
平均合并
2 分钟
30 天内合并 PR
35

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

A21-devs/Virtual-Machine-Manager 的其他 Issue

查看 A21-devs/Virtual-Machine-Manager 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。