@parallelworks/tandem-web 0.150.2 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +2 -2
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { Link as e, useNavigate as t } from "../../../lib/router.js";
|
|
2
2
|
import { auditLogQuery as n } from "../../../api/queries.js";
|
|
3
3
|
import { CalendarIcon as r, HistoryIcon as i, UserIcon as a, usePriorityNames as o } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
4
|
+
import { usePeople as s } from "../../../lib/people.js";
|
|
5
|
+
import { useTime as c } from "../../../lib/time.js";
|
|
6
|
+
import { useCan as l, useRoleName as u } from "../../../lib/roles.js";
|
|
7
|
+
import { SettingsPage as d } from "../../../components/settings.js";
|
|
8
|
+
import { AreaLink as f } from "../../../components/AreaLink.js";
|
|
9
|
+
import { paramFields as p } from "./audit-log.js";
|
|
10
|
+
import { Route as m } from "./audit-log2.js";
|
|
11
|
+
import { Timeline as h, TimelineItem as g, activityIcon as _ } from "../../../components/ActivityTimeline.js";
|
|
12
|
+
import { emojis as v } from "../../../components/Reactions.js";
|
|
13
|
+
import { Avatar as y, Button as b, Callout as x, EmptyState as S } from "@parallelworks/ui";
|
|
14
|
+
import { useMemo as C } from "react";
|
|
15
|
+
import { useFormatter as w, useTranslations as T } from "use-intl";
|
|
16
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
17
|
+
import { keepPreviousData as k, useInfiniteQuery as A } from "@tanstack/react-query";
|
|
18
|
+
import { ListFilterBar as j, ListFilterMenu as M, dateFilterRange as N, decodeFilters as P, useListFilters as F, withFilterParams as I } from "@parallelworks/ui/list";
|
|
18
19
|
// src/routes/$workspace/settings/audit-log.tsx?tsr-split=component
|
|
19
|
-
var
|
|
20
|
+
var L = [
|
|
20
21
|
"issue",
|
|
21
22
|
"comment",
|
|
22
23
|
"label",
|
|
@@ -31,18 +32,18 @@ var I = [
|
|
|
31
32
|
"agent",
|
|
32
33
|
"workspace"
|
|
33
34
|
];
|
|
34
|
-
function
|
|
35
|
-
let { workspace: e } =
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
function R() {
|
|
36
|
+
let { workspace: e } = m.useParams(), t = T("audit"), n = l(e, "manage_workspace");
|
|
37
|
+
return /* @__PURE__ */ D(d, {
|
|
37
38
|
title: t("title"),
|
|
38
39
|
description: t("description"),
|
|
39
|
-
children: n ? /* @__PURE__ */
|
|
40
|
+
children: n ? /* @__PURE__ */ D(B, { workspace: e }) : /* @__PURE__ */ D(x, {
|
|
40
41
|
tone: "muted",
|
|
41
42
|
children: t("adminOnly")
|
|
42
43
|
})
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function z(e) {
|
|
46
47
|
let t = {};
|
|
47
48
|
for (let n of e) {
|
|
48
49
|
let e = n.values[0];
|
|
@@ -51,18 +52,18 @@ function R(e) {
|
|
|
51
52
|
t.actorKind = n === "agent" ? "agent" : "user", i && i !== "*" && (t.actor = i);
|
|
52
53
|
} else if (n.field === "type" && e) t.type = `${e}.`;
|
|
53
54
|
else if (n.field === "date") {
|
|
54
|
-
let e =
|
|
55
|
+
let e = N(n);
|
|
55
56
|
e?.from && (t.since = e.from.toISOString()), e?.to && (t.until = e.to.toISOString());
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
return t;
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
let o =
|
|
61
|
+
function B({ workspace: e }) {
|
|
62
|
+
let o = T("audit"), c = m.useSearch(), l = t({ from: m.fullPath }), { members: u, agents: d } = s(e), f = C(() => [
|
|
62
63
|
{
|
|
63
64
|
key: "actor",
|
|
64
65
|
label: o("actor"),
|
|
65
|
-
icon: /* @__PURE__ */
|
|
66
|
+
icon: /* @__PURE__ */ D(a, {}),
|
|
66
67
|
kind: "people",
|
|
67
68
|
multiple: !1,
|
|
68
69
|
operators: ["is"],
|
|
@@ -75,22 +76,22 @@ function z({ workspace: e }) {
|
|
|
75
76
|
value: "agent:*",
|
|
76
77
|
label: o("anyAgent")
|
|
77
78
|
},
|
|
78
|
-
...
|
|
79
|
+
...u.map((e) => ({
|
|
79
80
|
value: `user:${e.user.username}`,
|
|
80
81
|
label: e.user.name,
|
|
81
82
|
group: o("people"),
|
|
82
|
-
icon: /* @__PURE__ */
|
|
83
|
+
icon: /* @__PURE__ */ D(y, {
|
|
83
84
|
name: e.user.name,
|
|
84
85
|
src: e.user.avatarUrl,
|
|
85
86
|
size: "xs",
|
|
86
87
|
decorative: !0
|
|
87
88
|
})
|
|
88
89
|
})),
|
|
89
|
-
...
|
|
90
|
+
...d.map((e) => ({
|
|
90
91
|
value: `agent:${e.slug}`,
|
|
91
92
|
label: e.name,
|
|
92
93
|
group: o("agents"),
|
|
93
|
-
icon: /* @__PURE__ */
|
|
94
|
+
icon: /* @__PURE__ */ D(y, {
|
|
94
95
|
name: e.name,
|
|
95
96
|
kind: "agent",
|
|
96
97
|
size: "xs",
|
|
@@ -102,11 +103,11 @@ function z({ workspace: e }) {
|
|
|
102
103
|
{
|
|
103
104
|
key: "type",
|
|
104
105
|
label: o("activity"),
|
|
105
|
-
icon: /* @__PURE__ */
|
|
106
|
+
icon: /* @__PURE__ */ D(i, {}),
|
|
106
107
|
kind: "enum",
|
|
107
108
|
multiple: !1,
|
|
108
109
|
operators: ["is"],
|
|
109
|
-
options:
|
|
110
|
+
options: L.map((e) => ({
|
|
110
111
|
value: e,
|
|
111
112
|
label: o(`types.${e}`)
|
|
112
113
|
}))
|
|
@@ -114,61 +115,61 @@ function z({ workspace: e }) {
|
|
|
114
115
|
{
|
|
115
116
|
key: "date",
|
|
116
117
|
label: o("date"),
|
|
117
|
-
icon: /* @__PURE__ */
|
|
118
|
+
icon: /* @__PURE__ */ D(r, {}),
|
|
118
119
|
kind: "date"
|
|
119
120
|
}
|
|
120
121
|
], [
|
|
121
122
|
o,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
]), g =
|
|
123
|
+
u,
|
|
124
|
+
d
|
|
125
|
+
]), g = F({
|
|
125
126
|
storageKey: `audit-log:${e}`,
|
|
126
|
-
fields:
|
|
127
|
+
fields: f,
|
|
127
128
|
store: {
|
|
128
|
-
value:
|
|
129
|
-
onChange: (e) =>
|
|
130
|
-
search: (t) =>
|
|
129
|
+
value: P(c, p),
|
|
130
|
+
onChange: (e) => l({
|
|
131
|
+
search: (t) => I(t, e, p),
|
|
131
132
|
replace: !0
|
|
132
133
|
})
|
|
133
134
|
}
|
|
134
|
-
}), _ =
|
|
135
|
+
}), _ = z(g.active), v = Object.keys(_).length > 0, { data: x, fetchNextPage: w, hasNextPage: N, isFetchingNextPage: R } = A({
|
|
135
136
|
...n(e, _),
|
|
136
|
-
placeholderData:
|
|
137
|
-
}), B =
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
137
|
+
placeholderData: k
|
|
138
|
+
}), B = x?.pages.flatMap((e) => e.entries) ?? [];
|
|
139
|
+
return /* @__PURE__ */ O(E, { children: [
|
|
140
|
+
/* @__PURE__ */ D(j, {
|
|
140
141
|
filters: g,
|
|
141
|
-
end: /* @__PURE__ */
|
|
142
|
+
end: /* @__PURE__ */ D(M, { filters: g }),
|
|
142
143
|
className: "mb-2"
|
|
143
144
|
}),
|
|
144
|
-
|
|
145
|
-
icon: /* @__PURE__ */
|
|
146
|
-
title: o(
|
|
147
|
-
description: o(
|
|
148
|
-
}) : /* @__PURE__ */
|
|
145
|
+
x && B.length === 0 ? /* @__PURE__ */ D(S, {
|
|
146
|
+
icon: /* @__PURE__ */ D(i, {}),
|
|
147
|
+
title: o(v ? "noMatches" : "empty"),
|
|
148
|
+
description: o(v ? "noMatchesDescription" : "emptyDescription")
|
|
149
|
+
}) : /* @__PURE__ */ D(h, { children: B.map((t) => /* @__PURE__ */ D(W, {
|
|
149
150
|
workspace: e,
|
|
150
151
|
entry: t
|
|
151
152
|
}, t.id)) }),
|
|
152
|
-
|
|
153
|
+
N && /* @__PURE__ */ D("div", {
|
|
153
154
|
className: "mt-3 flex justify-center",
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ D(b, {
|
|
155
156
|
type: "button",
|
|
156
157
|
size: "sm",
|
|
157
|
-
disabled:
|
|
158
|
-
onClick: () =>
|
|
159
|
-
children: o(
|
|
158
|
+
disabled: R,
|
|
159
|
+
onClick: () => w(),
|
|
160
|
+
children: o(R ? "loadingMore" : "loadMore")
|
|
160
161
|
})
|
|
161
162
|
})
|
|
162
163
|
] });
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
+
function V(e) {
|
|
165
166
|
return e.type === "related" ? "related" : e.type === "blocks" ? e.outgoing ? "blocks" : "blockedBy" : e.outgoing ? "duplicates" : "duplicatedBy";
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
+
function H({ workspace: t, entry: n, children: r }) {
|
|
168
169
|
let { kind: i, key: a } = n.target, o = "font-medium text-foreground hover:underline";
|
|
169
|
-
if (!a) return /* @__PURE__ */
|
|
170
|
+
if (!a) return /* @__PURE__ */ D("span", { children: r });
|
|
170
171
|
switch (i) {
|
|
171
|
-
case "issue": return /* @__PURE__ */
|
|
172
|
+
case "issue": return /* @__PURE__ */ D(e, {
|
|
172
173
|
to: "/$workspace/issues/$identifier",
|
|
173
174
|
params: {
|
|
174
175
|
workspace: t,
|
|
@@ -177,7 +178,7 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
177
178
|
className: `${o} whitespace-nowrap`,
|
|
178
179
|
children: r
|
|
179
180
|
});
|
|
180
|
-
case "doc": return /* @__PURE__ */
|
|
181
|
+
case "doc": return /* @__PURE__ */ D(e, {
|
|
181
182
|
to: "/$workspace/docs/$doc",
|
|
182
183
|
params: {
|
|
183
184
|
workspace: t,
|
|
@@ -186,7 +187,7 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
186
187
|
className: o,
|
|
187
188
|
children: r
|
|
188
189
|
});
|
|
189
|
-
case "knowledge": return /* @__PURE__ */
|
|
190
|
+
case "knowledge": return /* @__PURE__ */ D(e, {
|
|
190
191
|
to: "/$workspace/knowledge/$term",
|
|
191
192
|
params: {
|
|
192
193
|
workspace: t,
|
|
@@ -195,7 +196,7 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
195
196
|
className: o,
|
|
196
197
|
children: r
|
|
197
198
|
});
|
|
198
|
-
case "agent": return /* @__PURE__ */
|
|
199
|
+
case "agent": return /* @__PURE__ */ D(e, {
|
|
199
200
|
to: "/$workspace/agents/$slug",
|
|
200
201
|
params: {
|
|
201
202
|
workspace: t,
|
|
@@ -204,14 +205,14 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
204
205
|
className: o,
|
|
205
206
|
children: r
|
|
206
207
|
});
|
|
207
|
-
case "label": return /* @__PURE__ */
|
|
208
|
+
case "label": return /* @__PURE__ */ D(e, {
|
|
208
209
|
to: "/$workspace/issues",
|
|
209
210
|
params: { workspace: t },
|
|
210
211
|
search: { label: a },
|
|
211
212
|
className: o,
|
|
212
213
|
children: r
|
|
213
214
|
});
|
|
214
|
-
case "team": return /* @__PURE__ */
|
|
215
|
+
case "team": return /* @__PURE__ */ D(e, {
|
|
215
216
|
to: "/$workspace/teams/$key/settings",
|
|
216
217
|
params: {
|
|
217
218
|
workspace: t,
|
|
@@ -220,7 +221,7 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
220
221
|
className: o,
|
|
221
222
|
children: r
|
|
222
223
|
});
|
|
223
|
-
case "project": return /* @__PURE__ */
|
|
224
|
+
case "project": return /* @__PURE__ */ D(e, {
|
|
224
225
|
to: "/$workspace/projects/$projectId",
|
|
225
226
|
params: {
|
|
226
227
|
workspace: t,
|
|
@@ -229,16 +230,13 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
229
230
|
className: o,
|
|
230
231
|
children: r
|
|
231
232
|
});
|
|
232
|
-
case "area": return /* @__PURE__ */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
workspace: t,
|
|
236
|
-
area: a
|
|
237
|
-
},
|
|
233
|
+
case "area": return /* @__PURE__ */ D(f, {
|
|
234
|
+
workspace: t,
|
|
235
|
+
area: { key: a },
|
|
238
236
|
className: o,
|
|
239
237
|
children: r
|
|
240
238
|
});
|
|
241
|
-
default: return /* @__PURE__ */
|
|
239
|
+
default: return /* @__PURE__ */ D(e, {
|
|
242
240
|
to: "/$workspace/settings",
|
|
243
241
|
params: { workspace: t },
|
|
244
242
|
className: o,
|
|
@@ -246,90 +244,90 @@ function V({ workspace: t, entry: n, children: r }) {
|
|
|
246
244
|
});
|
|
247
245
|
}
|
|
248
246
|
}
|
|
249
|
-
function
|
|
250
|
-
let t =
|
|
247
|
+
function U(e) {
|
|
248
|
+
let t = T("relations"), n = T("flow"), r = w(), i = c(), a = o(), { person: l, nameOf: d } = s(e), f = u(e);
|
|
251
249
|
return (e) => {
|
|
252
|
-
let o = e.data ?? {},
|
|
250
|
+
let o = e.data ?? {}, s = (e) => String(o[e] ?? ""), c = (e) => o[e]?.name ?? "", u = (e) => a[Number(o[e])] ?? "";
|
|
253
251
|
switch (e.type) {
|
|
254
252
|
case "issue.created": return ["issueCreated", {}];
|
|
255
253
|
case "issue.title_changed": return ["issueTitleChanged", {
|
|
256
|
-
from:
|
|
257
|
-
to:
|
|
254
|
+
from: s("from"),
|
|
255
|
+
to: s("to")
|
|
258
256
|
}];
|
|
259
257
|
case "issue.body_changed": return ["issueBodyChanged", {}];
|
|
260
258
|
case "issue.status_changed": return ["issueStatusChanged", {
|
|
261
|
-
from:
|
|
262
|
-
to:
|
|
259
|
+
from: c("from"),
|
|
260
|
+
to: c("to")
|
|
263
261
|
}];
|
|
264
262
|
case "issue.priority_changed": return ["issuePriorityChanged", {
|
|
265
|
-
from:
|
|
266
|
-
to:
|
|
263
|
+
from: u("from"),
|
|
264
|
+
to: u("to")
|
|
267
265
|
}];
|
|
268
266
|
case "issue.assignee_added":
|
|
269
|
-
case "issue.assignee_removed": return [e.type === "issue.assignee_added" ? "issueAssigned" : "issueUnassigned", { assignee:
|
|
270
|
-
case "issue.label_added": return ["issueLabelAdded", { label:
|
|
271
|
-
case "issue.label_removed": return ["issueLabelRemoved", { label:
|
|
272
|
-
case "issue.parent_changed": return o.identifier ? ["issueParentSet", { identifier:
|
|
267
|
+
case "issue.assignee_removed": return [e.type === "issue.assignee_added" ? "issueAssigned" : "issueUnassigned", { assignee: d(s("kind"), s("handle")) }];
|
|
268
|
+
case "issue.label_added": return ["issueLabelAdded", { label: s("name") }];
|
|
269
|
+
case "issue.label_removed": return ["issueLabelRemoved", { label: s("name") }];
|
|
270
|
+
case "issue.parent_changed": return o.identifier ? ["issueParentSet", { identifier: s("identifier") }] : ["issueParentCleared", {}];
|
|
273
271
|
case "issue.relation_added":
|
|
274
272
|
case "issue.relation_removed": return [e.type === "issue.relation_added" ? "issueRelationAdded" : "issueRelationRemoved", {
|
|
275
|
-
relation: t(`kinds.${
|
|
276
|
-
identifier:
|
|
273
|
+
relation: t(`kinds.${V(o)}`).toLowerCase(),
|
|
274
|
+
identifier: s("identifier")
|
|
277
275
|
}];
|
|
278
276
|
case "issue.pull_request_changed": return ["issuePullRequest", {
|
|
279
|
-
repository:
|
|
280
|
-
number:
|
|
277
|
+
repository: s("repository"),
|
|
278
|
+
number: s("number")
|
|
281
279
|
}];
|
|
282
280
|
case "issue.pull_request_unlinked": return ["issuePullRequestUnlinked", {
|
|
283
|
-
repository:
|
|
284
|
-
number:
|
|
281
|
+
repository: s("repository"),
|
|
282
|
+
number: s("number")
|
|
285
283
|
}];
|
|
286
284
|
case "issue.branch_changed": return ["issueBranch", {
|
|
287
|
-
branch:
|
|
285
|
+
branch: s("branch"),
|
|
288
286
|
deleted: o.deleted ? "yes" : "no"
|
|
289
287
|
}];
|
|
290
288
|
case "issue.archived": return ["issueArchived", {}];
|
|
291
289
|
case "issue.restored": return ["issueRestored", {}];
|
|
292
290
|
case "issue.deleted": return ["issueDeleted", {
|
|
293
|
-
identifier:
|
|
294
|
-
title:
|
|
291
|
+
identifier: s("identifier"),
|
|
292
|
+
title: s("title")
|
|
295
293
|
}];
|
|
296
|
-
case "issue.attachment_added": return ["issueAttachmentAdded", { file:
|
|
294
|
+
case "issue.attachment_added": return ["issueAttachmentAdded", { file: s("name") }];
|
|
297
295
|
case "issue.released": return ["issueReleased", {
|
|
298
|
-
commit:
|
|
296
|
+
commit: s("commit").slice(0, 7),
|
|
299
297
|
targets: r.list(o.targets ?? [])
|
|
300
298
|
}];
|
|
301
|
-
case "issue.stage_changed": return o.to ? ["issueStageMoved", { stage: n(`stages.${
|
|
299
|
+
case "issue.stage_changed": return o.to ? ["issueStageMoved", { stage: n(`stages.${s("to")}`) }] : ["issueStageLeft", {}];
|
|
302
300
|
case "issue.area_changed":
|
|
303
301
|
case "doc.area_changed": {
|
|
304
302
|
let t = o.to?.title, n = e.type === "doc.area_changed";
|
|
305
303
|
return t ? [n ? "docAreaSet" : "issueAreaSet", { area: t }] : [n ? "docAreaCleared" : "issueAreaCleared", {}];
|
|
306
304
|
}
|
|
307
|
-
case "issue.project_changed": return o.name ? ["issueProjectSet", { project:
|
|
308
|
-
case "issue.milestone_changed": return o.name ? ["issueMilestoneSet", { milestone:
|
|
309
|
-
case "issue.cycle_changed": return o.number ? ["issueCycleSet", { number:
|
|
305
|
+
case "issue.project_changed": return o.name ? ["issueProjectSet", { project: s("name") }] : ["issueProjectCleared", {}];
|
|
306
|
+
case "issue.milestone_changed": return o.name ? ["issueMilestoneSet", { milestone: s("name") }] : ["issueMilestoneCleared", {}];
|
|
307
|
+
case "issue.cycle_changed": return o.number ? ["issueCycleSet", { number: s("number") }] : ["issueCycleCleared", {}];
|
|
310
308
|
case "issue.estimate_changed": return Number(o.to) ? ["issueEstimateSet", { points: r.number(Number(o.to)) }] : ["issueEstimateCleared", {}];
|
|
311
|
-
case "issue.due_date_changed": return o.to ? ["issueDueDateSet", { date: i.day(
|
|
312
|
-
case "issue.type_changed": return o.to ? ["issueTypeChanged", { type:
|
|
309
|
+
case "issue.due_date_changed": return o.to ? ["issueDueDateSet", { date: i.day(s("to")) }] : ["issueDueDateCleared", {}];
|
|
310
|
+
case "issue.type_changed": return o.to ? ["issueTypeChanged", { type: s("to") }] : ["issueTypeCleared", {}];
|
|
313
311
|
case "issue.fields_changed": return ["issueFieldsChanged", { fields: r.list(o.fields ?? []) }];
|
|
314
312
|
case "issue.reaction_added":
|
|
315
|
-
case "issue.reaction_removed": return [e.type === "issue.reaction_added" ? "issueReactionAdded" : "issueReactionRemoved", { emoji:
|
|
313
|
+
case "issue.reaction_removed": return [e.type === "issue.reaction_added" ? "issueReactionAdded" : "issueReactionRemoved", { emoji: v[s("emoji")] ?? s("emoji") }];
|
|
316
314
|
case "issue.triage_accepted": return ["issueTriageAccepted", {}];
|
|
317
315
|
case "issue.triage_declined": return ["issueTriageDeclined", {}];
|
|
318
316
|
case "comment.created": return ["commentCreated", {}];
|
|
319
317
|
case "comment.edited": return ["commentEdited", {}];
|
|
320
318
|
case "comment.deleted": return ["commentDeleted", {}];
|
|
321
319
|
case "run.created": return ["runCreated", {}];
|
|
322
|
-
case "run.state_changed": return ["runState", { state:
|
|
320
|
+
case "run.state_changed": return ["runState", { state: s("to") }];
|
|
323
321
|
case "decision.requested": return ["decisionRequested", {}];
|
|
324
322
|
case "decision.answered": return ["decisionAnswered", {}];
|
|
325
323
|
case "label.created": return ["labelCreated", {}];
|
|
326
324
|
case "label.updated": return ["labelUpdated", {}];
|
|
327
325
|
case "label.deleted": return ["labelDeleted", {}];
|
|
328
|
-
case "team.status_created": return ["statusCreated", { status:
|
|
329
|
-
case "team.status_updated": return ["statusUpdated", { status:
|
|
326
|
+
case "team.status_created": return ["statusCreated", { status: s("name") }];
|
|
327
|
+
case "team.status_updated": return ["statusUpdated", { status: s("name") }];
|
|
330
328
|
case "team.status_deleted": return ["statusDeleted", {
|
|
331
|
-
status:
|
|
332
|
-
movedTo:
|
|
329
|
+
status: c("status"),
|
|
330
|
+
movedTo: c("movedTo")
|
|
333
331
|
}];
|
|
334
332
|
case "issue.team_changed": {
|
|
335
333
|
let e = (e) => {
|
|
@@ -344,9 +342,9 @@ function H(e) {
|
|
|
344
342
|
case "project.created": return ["projectCreated", {}];
|
|
345
343
|
case "project.updated": return ["projectUpdated", {}];
|
|
346
344
|
case "project.deleted": return ["projectDeleted", {}];
|
|
347
|
-
case "project.milestone_created": return ["milestoneCreated", { milestone:
|
|
348
|
-
case "project.milestone_updated": return ["milestoneUpdated", { milestone:
|
|
349
|
-
case "project.milestone_deleted": return ["milestoneDeleted", { milestone:
|
|
345
|
+
case "project.milestone_created": return ["milestoneCreated", { milestone: s("name") }];
|
|
346
|
+
case "project.milestone_updated": return ["milestoneUpdated", { milestone: s("name") }];
|
|
347
|
+
case "project.milestone_deleted": return ["milestoneDeleted", { milestone: s("name") }];
|
|
350
348
|
case "project.update_posted": return ["updatePosted", {}];
|
|
351
349
|
case "project.update_deleted": return ["updateDeleted", {}];
|
|
352
350
|
case "area.created": return ["areaCreated", {}];
|
|
@@ -355,19 +353,19 @@ function H(e) {
|
|
|
355
353
|
case "area.merged": return ["areaMerged", {}];
|
|
356
354
|
case "area.archived": return ["areaArchived", {}];
|
|
357
355
|
case "area.restored": return ["areaRestored", {}];
|
|
358
|
-
case "cycle.created": return ["cycleCreated", { number:
|
|
359
|
-
case "cycle.updated": return ["cycleUpdated", { number:
|
|
356
|
+
case "cycle.created": return ["cycleCreated", { number: s("number") }];
|
|
357
|
+
case "cycle.updated": return ["cycleUpdated", { number: s("number") }];
|
|
360
358
|
case "team.created": return ["teamCreated", {}];
|
|
361
359
|
case "team.updated": return ["teamUpdated", {}];
|
|
362
360
|
case "team.deleted": return ["teamDeleted", {}];
|
|
363
|
-
case "team.member_added": return ["teamMemberAdded", { person: s(
|
|
364
|
-
case "team.member_removed": return ["teamMemberRemoved", { person: s(
|
|
361
|
+
case "team.member_added": return ["teamMemberAdded", { person: l(s("username")).name }];
|
|
362
|
+
case "team.member_removed": return ["teamMemberRemoved", { person: l(s("username")).name }];
|
|
365
363
|
case "team.rotation_changed": return ["teamRotationChanged", {}];
|
|
366
|
-
case "team.rotation_handed_off": return ["teamRotationHandedOff", { person: s(
|
|
367
|
-
case "team.repository_linked": return ["teamRepositoryLinked", { repository:
|
|
368
|
-
case "team.repository_unlinked": return ["teamRepositoryUnlinked", { repository:
|
|
364
|
+
case "team.rotation_handed_off": return ["teamRotationHandedOff", { person: l(s("to")).name }];
|
|
365
|
+
case "team.repository_linked": return ["teamRepositoryLinked", { repository: s("repository") }];
|
|
366
|
+
case "team.repository_unlinked": return ["teamRepositoryUnlinked", { repository: s("repository") }];
|
|
369
367
|
case "doc.created": return ["docCreated", {}];
|
|
370
|
-
case "doc.title_changed": return ["docTitleChanged", { from:
|
|
368
|
+
case "doc.title_changed": return ["docTitleChanged", { from: s("from") }];
|
|
371
369
|
case "doc.body_changed": return ["docBodyChanged", {}];
|
|
372
370
|
case "doc.moved": return [e.target.kind === "doc" ? "docMoved" : "docMovedOut", {}];
|
|
373
371
|
case "doc.template_changed": return ["docTemplateChanged", { template: o.template ? "yes" : "no" }];
|
|
@@ -385,15 +383,15 @@ function H(e) {
|
|
|
385
383
|
case "knowledge.archived": return ["knowledgeArchived", {}];
|
|
386
384
|
case "knowledge.restored": return ["knowledgeRestored", {}];
|
|
387
385
|
case "agent.created": return ["agentCreated", {}];
|
|
388
|
-
case "agent.updated": return ["agentUpdated", { version:
|
|
386
|
+
case "agent.updated": return ["agentUpdated", { version: s("version") }];
|
|
389
387
|
case "workspace.created": return ["workspaceCreated", {}];
|
|
390
388
|
case "workspace.updated": return ["workspaceUpdated", {}];
|
|
391
|
-
case "workspace.role_created": return ["roleCreated", { role:
|
|
392
|
-
case "workspace.role_updated": return ["roleUpdated", { role:
|
|
393
|
-
case "workspace.role_deleted": return ["roleDeleted", { role:
|
|
389
|
+
case "workspace.role_created": return ["roleCreated", { role: s("name") }];
|
|
390
|
+
case "workspace.role_updated": return ["roleUpdated", { role: s("name") }];
|
|
391
|
+
case "workspace.role_deleted": return ["roleDeleted", { role: s("name") }];
|
|
394
392
|
case "workspace.member_role_changed": return ["memberRoleChanged", {
|
|
395
|
-
person: s(
|
|
396
|
-
role:
|
|
393
|
+
person: l(s("username")).name,
|
|
394
|
+
role: f(s("role"))
|
|
397
395
|
}];
|
|
398
396
|
case "workspace.access_changed": return ["workspaceAccessChanged", {}];
|
|
399
397
|
case "team.access_changed": return ["teamAccessChanged", {}];
|
|
@@ -402,34 +400,34 @@ function H(e) {
|
|
|
402
400
|
}
|
|
403
401
|
};
|
|
404
402
|
}
|
|
405
|
-
function
|
|
406
|
-
let n =
|
|
407
|
-
agent: a(
|
|
408
|
-
person: i(
|
|
409
|
-
}) : o(
|
|
403
|
+
function W({ workspace: e, entry: t }) {
|
|
404
|
+
let n = T("audit"), r = U(e), { person: i, agentName: a, actorName: o } = s(e), { actor: c, target: l } = t, u = c.kind === "agent", d = u && c.onBehalfOf ? n("onBehalfOf", {
|
|
405
|
+
agent: a(c.handle),
|
|
406
|
+
person: i(c.onBehalfOf).name
|
|
407
|
+
}) : o(c), f = l.kind === "issue" ? l.key : l.kind === "agent" ? a(l.key) : l.title || l.key, [p, m] = r(t), h = n.rich(`events.${p}`, {
|
|
410
408
|
...m,
|
|
411
409
|
name: d,
|
|
412
410
|
target: f || n("removedTarget"),
|
|
413
|
-
actor: (e) => /* @__PURE__ */
|
|
411
|
+
actor: (e) => /* @__PURE__ */ O(E, { children: [u && /* @__PURE__ */ D("span", {
|
|
414
412
|
className: "mr-1 rounded bg-agent-soft px-1.5 py-px align-[1px] text-[10px] font-medium text-agent",
|
|
415
413
|
children: n("agentBadge")
|
|
416
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ D("span", {
|
|
417
415
|
className: "font-medium text-foreground",
|
|
418
416
|
children: e
|
|
419
417
|
})] }),
|
|
420
|
-
link: (n) => /* @__PURE__ */
|
|
418
|
+
link: (n) => /* @__PURE__ */ D(H, {
|
|
421
419
|
workspace: e,
|
|
422
420
|
entry: t,
|
|
423
421
|
children: n
|
|
424
422
|
})
|
|
425
423
|
});
|
|
426
|
-
return /* @__PURE__ */
|
|
424
|
+
return /* @__PURE__ */ D(g, {
|
|
427
425
|
workspace: e,
|
|
428
|
-
icon:
|
|
429
|
-
actor:
|
|
426
|
+
icon: _(t.type, t.data),
|
|
427
|
+
actor: c,
|
|
430
428
|
at: t.createdAt,
|
|
431
|
-
detail:
|
|
432
|
-
children:
|
|
429
|
+
detail: l.kind === "issue" && l.title,
|
|
430
|
+
children: h
|
|
433
431
|
});
|
|
434
432
|
}
|
|
435
|
-
export {
|
|
433
|
+
export { R as component };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useCan as e } from "../../../lib/roles.js";
|
|
2
|
+
import { IssueTypeSettings as t } from "../../../components/IssueTypes.js";
|
|
3
|
+
import { AdminOnly as n, SettingsPage as r } from "../../../components/settings.js";
|
|
4
|
+
import { FieldSettings as i } from "../../../components/CustomFields.js";
|
|
5
|
+
import { Route as a } from "./fields.js";
|
|
6
6
|
import { useTranslations as o } from "use-intl";
|
|
7
7
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
8
|
// src/routes/$workspace/settings/fields.tsx?tsr-split=component
|
|
9
9
|
function l() {
|
|
10
|
-
let { workspace: l } =
|
|
11
|
-
return /* @__PURE__ */ c(
|
|
10
|
+
let { workspace: l } = a.useParams(), u = o("customFields"), d = e(l, "manage_labels");
|
|
11
|
+
return /* @__PURE__ */ c(r, {
|
|
12
12
|
title: u("title"),
|
|
13
13
|
description: u("pageDescription"),
|
|
14
|
-
children: [/* @__PURE__ */ s(
|
|
14
|
+
children: [/* @__PURE__ */ s(n, { workspace: l }), d && /* @__PURE__ */ c("div", {
|
|
15
15
|
className: "space-y-10",
|
|
16
16
|
children: [
|
|
17
|
-
/* @__PURE__ */ s(
|
|
18
|
-
/* @__PURE__ */ s(
|
|
17
|
+
/* @__PURE__ */ s(t, { workspace: l }),
|
|
18
|
+
/* @__PURE__ */ s(i, {
|
|
19
19
|
workspace: l,
|
|
20
20
|
target: "issue"
|
|
21
21
|
}),
|
|
22
|
-
/* @__PURE__ */ s(
|
|
22
|
+
/* @__PURE__ */ s(i, {
|
|
23
23
|
workspace: l,
|
|
24
24
|
target: "project"
|
|
25
25
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { codeHostQuery as e } from "../../../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useCan as t } from "../../../lib/roles.js";
|
|
3
|
+
import { AdminOnly as n, SettingsPage as r } from "../../../components/settings.js";
|
|
4
|
+
import { Route as i } from "./github.js";
|
|
5
5
|
import { GitHubSettings as a } from "../../../components/GitHub.js";
|
|
6
6
|
import { CodeHostDangerZone as o, CodeHostSettings as s } from "../../../components/CodeHostSettings.js";
|
|
7
7
|
import { useTranslations as c } from "use-intl";
|
|
@@ -9,12 +9,12 @@ import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
|
9
9
|
import { useSuspenseQuery as d } from "@tanstack/react-query";
|
|
10
10
|
// src/routes/$workspace/settings/github.tsx?tsr-split=component
|
|
11
11
|
function f() {
|
|
12
|
-
let { workspace: f } =
|
|
13
|
-
return /* @__PURE__ */ u(
|
|
12
|
+
let { workspace: f } = i.useParams(), { codeHost: p } = i.useSearch(), { data: m } = d(e(f)), h = t(f, "manage_workspace"), g = c("settingsNav"), _ = c("code");
|
|
13
|
+
return /* @__PURE__ */ u(r, {
|
|
14
14
|
title: g("github"),
|
|
15
15
|
description: _("pageDescription"),
|
|
16
16
|
children: [
|
|
17
|
-
/* @__PURE__ */ l(
|
|
17
|
+
/* @__PURE__ */ l(n, { workspace: f }),
|
|
18
18
|
/* @__PURE__ */ l(s, {
|
|
19
19
|
workspace: f,
|
|
20
20
|
isAdmin: h,
|