@harborppm/cli 0.82.0 → 0.83.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/dist/app.mjs +33 -2
- package/package.json +1 -1
package/dist/app.mjs
CHANGED
|
@@ -23851,6 +23851,19 @@ function tasksSlice({ set, get, write }) {
|
|
|
23851
23851
|
} : i)
|
|
23852
23852
|
} : t) });
|
|
23853
23853
|
},
|
|
23854
|
+
renameChecklistItem: (taskId, itemId, title) => {
|
|
23855
|
+
const name = title.trim();
|
|
23856
|
+
const item = get().tasks.find((t) => t.id === taskId)?.checklist?.find((i) => i.id === itemId);
|
|
23857
|
+
if (!name || !item || item.title === name) return;
|
|
23858
|
+
set({ tasks: get().tasks.map((t) => t.id === taskId ? {
|
|
23859
|
+
...t,
|
|
23860
|
+
touchedAt: stamp(),
|
|
23861
|
+
checklist: (t.checklist ?? []).map((i) => i.id === itemId ? {
|
|
23862
|
+
...i,
|
|
23863
|
+
title: name
|
|
23864
|
+
} : i)
|
|
23865
|
+
} : t) });
|
|
23866
|
+
},
|
|
23854
23867
|
removeChecklistItem: (taskId, itemId) => {
|
|
23855
23868
|
set({ tasks: get().tasks.map((t) => t.id === taskId ? {
|
|
23856
23869
|
...t,
|
|
@@ -30171,6 +30184,13 @@ function TaskPanel({ taskId, width, height, go, active = true, onClose }) {
|
|
|
30171
30184
|
const item = task.checklist[at - stepsFrom];
|
|
30172
30185
|
if (item && (input === " " || key.return)) return store.getState().toggleChecklistItem(task.id, item.id);
|
|
30173
30186
|
if (item && input === "-") return store.getState().removeChecklistItem(task.id, item.id);
|
|
30187
|
+
if (item && input === "e") {
|
|
30188
|
+
if (viewOnly) return go.notify("You can only view this harbor.");
|
|
30189
|
+
return setEditing({
|
|
30190
|
+
kind: "restep",
|
|
30191
|
+
id: item.id
|
|
30192
|
+
});
|
|
30193
|
+
}
|
|
30174
30194
|
if (input === "o") {
|
|
30175
30195
|
if (viewOnly) return go.notify("You can only view this harbor.");
|
|
30176
30196
|
if (alsoOnIds(task).length === 0 && alsoOnChoices(task, people).length === 0) return go.notify("Nobody else to put on it yet. Invite your crew first.");
|
|
@@ -30239,7 +30259,18 @@ function TaskPanel({ taskId, width, height, go, active = true, onClose }) {
|
|
|
30239
30259
|
done();
|
|
30240
30260
|
}
|
|
30241
30261
|
});
|
|
30242
|
-
else if (editing?.kind === "
|
|
30262
|
+
else if (editing?.kind === "restep") {
|
|
30263
|
+
const item = task.checklist.find((c) => c.id === editing.id);
|
|
30264
|
+
editor = /* @__PURE__ */ jsx(TextField, {
|
|
30265
|
+
label: "Checklist step",
|
|
30266
|
+
initial: item?.title ?? "",
|
|
30267
|
+
onCancel: done,
|
|
30268
|
+
onSubmit: (text) => {
|
|
30269
|
+
if (item) store.getState().renameChecklistItem(task.id, item.id, text);
|
|
30270
|
+
done();
|
|
30271
|
+
}
|
|
30272
|
+
});
|
|
30273
|
+
} else if (editing?.kind === "mine") editor = /* @__PURE__ */ jsx(Picker, {
|
|
30243
30274
|
title: "One of your comments: Enter to change it or take it out",
|
|
30244
30275
|
choices: mine.map((c) => ({
|
|
30245
30276
|
label: c.body.replace(/\s+/g, " "),
|
|
@@ -30562,7 +30593,7 @@ function TaskPanel({ taskId, width, height, go, active = true, onClose }) {
|
|
|
30562
30593
|
editor ?? /* @__PURE__ */ jsx(Text, {
|
|
30563
30594
|
color: theme.muted,
|
|
30564
30595
|
wrap: "truncate-end",
|
|
30565
|
-
children: "↑↓ field · Enter change · o who's on it · c comment · C yours · a add step · space tick · x done · S sounding · d delete · Esc close"
|
|
30596
|
+
children: "↑↓ field · Enter change · o who's on it · c comment · C yours · a add step · e edit step · space tick · x done · S sounding · d delete · Esc close"
|
|
30566
30597
|
})
|
|
30567
30598
|
]
|
|
30568
30599
|
});
|