Fix merged groups: unique names, public ChartSpec

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 15:54:43 -04:00
1 parent 6e899d839f
commit 7ef6ed9865
41 files changed
+79 -1103

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@
## 最小示例
```go
members := []mujica.Member{{ID: "ann", Name: "Ann"}, {ID: "ben", Name: "Ben"}}
members := []mujica.ProjectMember{{ID: "ann", Name: "Ann"}, {ID: "ben", Name: "Ben"}}
ids := []string{"ann"}
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
@@ -20,7 +20,7 @@ ui.Render(view, 1000, 700, 1)
## 参数
`ids *[]string`、`members []Member`;`Max=0` 表示自由数量;`Disabled`、`Label` 控制交互与名称;`Version` 用于外部原地修改。
`ids *[]string`、`members []ProjectMember`;`Max=0` 表示自由数量;`Disabled`、`Label` 控制交互与名称;`Version` 用于外部原地修改。
## 状态
+1 -1
View File
@@ -7,7 +7,7 @@
## 最小示例
```go
loads := []mujica.Workload{{Member: mujica.Member{ID: "ann", Name: "Ann"}, Assigned: 46, Capacity: 40}}
loads := []mujica.Workload{{Member: mujica.ProjectMember{ID: "ann", Name: "Ann"}, Assigned: 46, Capacity: 40}}
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
mujica.WorkloadView(c, loads, mujica.WorkloadViewOptions{})
+1 -1
View File
@@ -16,7 +16,7 @@ ui.Render(view, 400, 300, 1)
## 参数
`p Presence` 的零值为离线,支持 `PresenceOnline`、`PresenceAway`、`PresenceBusy`、`PresenceOffline`。`HideText` 默认 false;隐藏文字时保留名称和提示。`Size` 默认 10 DIP,必须 ≥ 0。
`p PresenceStatus` 的零值为离线,支持 `PresenceOnline`、`PresenceAway`、`PresenceBusy`、`PresenceOffline`。`HideText` 默认 false;隐藏文字时保留名称和提示。`Size` 默认 10 DIP,必须 ≥ 0。
## 状态
+2 -2
View File
@@ -7,7 +7,7 @@
## 最小示例
```go
spans := []mujica.TraceSpan{{ID: "root", Name: "GET /api", Service: "gateway", Duration: 200 * time.Millisecond}, {ID: "db", Parent: "root", Name: "Query", Service: "database", Start: 20 * time.Millisecond, Duration: 80 * time.Millisecond}}
spans := []mujica.WaterfallSpan{{ID: "root", Name: "GET /api", Service: "gateway", Duration: 200 * time.Millisecond}, {ID: "db", Parent: "root", Name: "Query", Service: "database", Start: 20 * time.Millisecond, Duration: 80 * time.Millisecond}}
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
if mujica.TraceWaterfall(c, spans, mujica.TraceWaterfallOptions{}).Changed() {
@@ -19,7 +19,7 @@ ui.Render(view, 720, 480, 1)
## 参数
Height 默认 320 DIP;TraceSpan.ID 唯一,Name 必填;Parent 关联父跨度;Start、Duration 为非负时间;Error 标记失败。
Height 默认 320 DIP;WaterfallSpan.ID 唯一,Name 必填;Parent 关联父跨度;Start、Duration 为非负时间;Error 标记失败。
## 状态
+2 -2
View File
@@ -9,7 +9,7 @@
## 最小示例
```go
status := mujica.PresenceOnline
status := mujica.UserStatusOnline
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
if mujica.UserMenu(c, &status, mujica.UserMenuOptions{Name: "Sakiko Togawa"}).SignOut() {
@@ -23,7 +23,7 @@ ui.Render(view, 400, 300, 1)
| 字段 | 类型 | 默认值 | 含义 |
| --- | --- | --- | --- |
| `status` | `*UserStatus` | 必填 | PresenceOnline、PresenceAway、PresenceBusy、PresenceInvisible。 |
| `status` | `*UserStatus` | 必填 | UserStatusOnline、UserStatusAway、UserStatusBusy、UserStatusInvisible。 |
| `Name` | `string` | 必填 | 用户名。 |
| `Email` | `string` | "" | 邮箱。 |
| `Avatar` | `*ui.Bitmap` | nil | 头像。 |