@tokz/cli 0.2.8 → 0.2.9
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.
|
@@ -1726,7 +1726,6 @@ import { Box as Box9, Text as Text10, useApp, useInput as useInput4 } from "ink"
|
|
|
1726
1726
|
|
|
1727
1727
|
// src/timeframe.ts
|
|
1728
1728
|
var TIMEFRAMES = [
|
|
1729
|
-
{ id: "all", label: "All time" },
|
|
1730
1729
|
{ id: "today", label: "Today" },
|
|
1731
1730
|
{ id: "yesterday", label: "Yesterday" },
|
|
1732
1731
|
{ id: "7d", label: "Last 7 days" },
|
|
@@ -1742,8 +1741,6 @@ function nextTimeframe(id) {
|
|
|
1742
1741
|
}
|
|
1743
1742
|
function timeframeRange(id, now = Date.now()) {
|
|
1744
1743
|
switch (id) {
|
|
1745
|
-
case "all":
|
|
1746
|
-
return void 0;
|
|
1747
1744
|
case "today":
|
|
1748
1745
|
return { from: isoDay(0, now), to: isoDay(0, now) };
|
|
1749
1746
|
case "yesterday":
|
|
@@ -2481,7 +2478,7 @@ function Dashboard({
|
|
|
2481
2478
|
] }) : null
|
|
2482
2479
|
] }),
|
|
2483
2480
|
/* @__PURE__ */ jsxs7(Text8, { dimColor: true, children: [
|
|
2484
|
-
timeframe
|
|
2481
|
+
timeframe ? /* @__PURE__ */ jsxs7(Text8, { color: "yellow", children: [
|
|
2485
2482
|
timeframe,
|
|
2486
2483
|
" \xB7 "
|
|
2487
2484
|
] }) : null,
|
|
@@ -2512,7 +2509,7 @@ var KEYS = [
|
|
|
2512
2509
|
["\u2190 \u2192 or 1\u20136", "switch dashboard tab"],
|
|
2513
2510
|
["/", "filter project list (esc clears)"],
|
|
2514
2511
|
["s", "cycle project sort: cost \xB7 recent \xB7 name"],
|
|
2515
|
-
["t", "cycle timeframe:
|
|
2512
|
+
["t", "cycle timeframe: today \xB7 yesterday \xB7 7d \xB7 30d"],
|
|
2516
2513
|
["g", "Activity tab: group by day \xB7 week \xB7 month"],
|
|
2517
2514
|
["esc", "go back"],
|
|
2518
2515
|
["?", "toggle this help"],
|
|
@@ -2590,7 +2587,7 @@ function App({
|
|
|
2590
2587
|
);
|
|
2591
2588
|
const [help, setHelp] = useState5(false);
|
|
2592
2589
|
const [filterCapture, setFilterCapture] = useState5(false);
|
|
2593
|
-
const [timeframe, setTimeframe] = useState5("
|
|
2590
|
+
const [timeframe, setTimeframe] = useState5("30d");
|
|
2594
2591
|
const scoped = useMemo2(
|
|
2595
2592
|
() => applyTimeframe(activeProjects, timeframeRange(timeframe)),
|
|
2596
2593
|
[activeProjects, timeframe]
|
|
@@ -2690,7 +2687,7 @@ function App({
|
|
|
2690
2687
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", flexGrow: 1, children: [
|
|
2691
2688
|
/* @__PURE__ */ jsx10(Box9, { flexDirection: "column", flexGrow: 1, children: content }),
|
|
2692
2689
|
/* @__PURE__ */ jsx10(Box9, { paddingX: 1, children: /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: help ? "any key to close help" : view === "agents" ? HINTS.agents : /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
2693
|
-
/* @__PURE__ */ jsxs9(Text10, { color:
|
|
2690
|
+
/* @__PURE__ */ jsxs9(Text10, { color: "yellow", children: [
|
|
2694
2691
|
"\u23F1 ",
|
|
2695
2692
|
tfLabel
|
|
2696
2693
|
] }),
|
package/dist/cli.js
CHANGED
|
@@ -276,7 +276,7 @@ program.action(async () => {
|
|
|
276
276
|
const [{ render }, React, { Root }, { Fullscreen }] = await Promise.all([
|
|
277
277
|
import("ink"),
|
|
278
278
|
import("react"),
|
|
279
|
-
import("./Root-
|
|
279
|
+
import("./Root-ZJO6F6LM.js"),
|
|
280
280
|
import("./Fullscreen-GK2ZYXHV.js")
|
|
281
281
|
]);
|
|
282
282
|
render(React.createElement(Fullscreen, null, React.createElement(Root)));
|