@burdenoff/microfe-timecampus 2026.1206.1 → 2026.1206.3
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/generated/global-types.d.ts +7409 -959
- package/dist/generated/wspace-operations.d.ts +46 -12
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +107058 -11342
- package/dist/generated/wspace-types.js +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/timecampus/components/DateFields.d.ts +53 -0
- package/dist/timecampus/components/DateFields.js +87 -0
- package/dist/timecampus/components/DateFields.js.map +1 -0
- package/dist/timecampus/components/dateFieldValues.d.ts +39 -0
- package/dist/timecampus/components/dateFieldValues.js +49 -0
- package/dist/timecampus/components/dateFieldValues.js.map +1 -0
- package/dist/timecampus/pages/channels/channelCatalog.js +2 -1
- package/dist/timecampus/pages/channels/channelCatalog.js.map +1 -1
- package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +112 -111
- package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +65 -65
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/focus/FocusProtectionPage.js +250 -253
- package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.js +259 -258
- package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/FiniteLifePage.js +103 -103
- package/dist/timecampus/pages/lifetime/FiniteLifePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +38 -38
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +218 -216
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js +64 -63
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js +54 -54
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingFormModal.js +98 -96
- package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +150 -149
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/projects/TasksPage.js +183 -182
- package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +346 -351
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +129 -127
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +46 -47
- package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +231 -231
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/package.json +4 -2
|
@@ -7,18 +7,19 @@ import { ToastContainer as te, useToast as ne } from "../../components/Toast.js"
|
|
|
7
7
|
import { useTimeCampus as re } from "../../providers/TimeCampusProvider.js";
|
|
8
8
|
import { TimeCampusFocusBlockResponse as i, TimeCampusFocusProtectionLevel as a, TimeCampusFocusSessionStatus as o } from "../../../generated/wspace-types.js";
|
|
9
9
|
import { useCancelFocusBlockMutation as ie, useEndFocusSessionMutation as ae, useGetActiveFocusSessionQuery as oe, useGetFocusBlockSuggestionsQuery as se, useGetFocusCalendarConnectionQuery as ce, useGetFocusPreferencesQuery as le, useGetFocusProtectionSummaryQuery as ue, useListFocusBlocksQuery as de, useLogFocusInterruptionMutation as fe, useRespondToFocusBlockSuggestionMutation as pe, useStartFocusSessionMutation as me, useUpdateFocusPreferencesMutation as he } from "../../../generated/wspace-operations.js";
|
|
10
|
-
import { DAY_MS as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { DAY_MS as ge, announceFocusChange as _e, calendarHoldLabel as ve, calendarProviderLabel as ye, canStartBlock as be, formatDuration as s, formatRange as xe, localDayStart as Se, minutesLeft as Ce, minutesToTime as c, parseAppList as we, parseSiteList as Te, readStartBlockParam as Ee, reasonLabel as De, startNudgeOptions as Oe, timeToMinutes as l, withoutStartBlockParam as ke } from "./focusHelpers.js";
|
|
11
|
+
import { TimeField as Ae } from "../../components/DateFields.js";
|
|
12
|
+
import { useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
13
|
+
import { AlarmClock as je, Ban as m, CalendarClock as Me, Check as Ne, Play as h, Shield as Pe, ShieldCheck as Fe, Square as Ie, Target as Le, X as Re } from "lucide-react";
|
|
14
|
+
import { Fragment as ze, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
|
+
import { GlassCard as Be, ThemedSelect as Ve } from "@burdenoff/fe-libs/ui";
|
|
15
16
|
// src/timecampus/pages/focus/FocusProtectionPage.tsx
|
|
16
|
-
var
|
|
17
|
+
var v = "Focus Protection", y = "Adaptive focus blocks and distraction blocking during focus sessions", He = [
|
|
17
18
|
"GetActiveFocusSession",
|
|
18
19
|
"GetFocusBlockSuggestions",
|
|
19
20
|
"ListFocusBlocks",
|
|
20
21
|
"GetFocusProtectionSummary"
|
|
21
|
-
],
|
|
22
|
+
], b = "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary", x = "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", S = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover disabled:opacity-50", C = {
|
|
22
23
|
on: "on",
|
|
23
24
|
off: "off",
|
|
24
25
|
running: "on",
|
|
@@ -27,90 +28,90 @@ var x = "Focus Protection", S = "Adaptive focus blocks and distraction blocking
|
|
|
27
28
|
"needs-setup": "needs a one-time setup",
|
|
28
29
|
error: "not working"
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
-
return
|
|
31
|
+
function w(e) {
|
|
32
|
+
return C[e] ?? e;
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function T(e) {
|
|
34
35
|
return e instanceof Error ? e.message : "Something went wrong";
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
let { workspaceId:
|
|
38
|
-
|
|
39
|
-
let e = window.setInterval(() =>
|
|
37
|
+
function E() {
|
|
38
|
+
let { workspaceId: C = "" } = re(), { toasts: E, addToast: D, dismissToast: Ue } = ne(), [O, We] = p(0), [k, Ge] = p(() => Date.now());
|
|
39
|
+
u(() => {
|
|
40
|
+
let e = window.setInterval(() => Ge(Date.now()), 6e4);
|
|
40
41
|
return () => window.clearInterval(e);
|
|
41
42
|
}, []);
|
|
42
|
-
let
|
|
43
|
+
let A = d(() => Se(/* @__PURE__ */ new Date(), O), [O]), Ke = d(() => new Date(A.getTime() + ge), [A]), qe = d(() => {
|
|
43
44
|
let e = /* @__PURE__ */ new Date();
|
|
44
45
|
return {
|
|
45
|
-
from: (/* @__PURE__ */ new Date(e.getTime() - 7 *
|
|
46
|
+
from: (/* @__PURE__ */ new Date(e.getTime() - 7 * ge)).toISOString(),
|
|
46
47
|
to: e.toISOString()
|
|
47
48
|
};
|
|
48
|
-
}, []),
|
|
49
|
-
variables: { dayStart:
|
|
50
|
-
skip: !
|
|
51
|
-
}),
|
|
49
|
+
}, []), j = oe({ skip: !C }), M = se({
|
|
50
|
+
variables: { dayStart: A.toISOString() },
|
|
51
|
+
skip: !C
|
|
52
|
+
}), N = de({
|
|
52
53
|
variables: {
|
|
53
|
-
from:
|
|
54
|
-
to:
|
|
54
|
+
from: A.toISOString(),
|
|
55
|
+
to: Ke.toISOString()
|
|
55
56
|
},
|
|
56
|
-
skip: !
|
|
57
|
-
}),
|
|
58
|
-
variables:
|
|
59
|
-
skip: !
|
|
60
|
-
}),
|
|
57
|
+
skip: !C
|
|
58
|
+
}), P = le({ skip: !C }), Je = ce({ skip: !C }), Ye = ue({
|
|
59
|
+
variables: qe,
|
|
60
|
+
skip: !C
|
|
61
|
+
}), F = { refetchQueries: He }, [I, { loading: L }] = me(F), [Xe, { loading: R }] = ae(F), [Ze] = fe(F), [Qe, { loading: z }] = pe(F), [$e] = ie(F), [et, { loading: B }] = he({ refetchQueries: [
|
|
61
62
|
"GetFocusPreferences",
|
|
62
63
|
"GetFocusBlockSuggestions",
|
|
63
64
|
"GetFocusCalendarConnection"
|
|
64
|
-
] }), [
|
|
65
|
-
|
|
66
|
-
H && (
|
|
65
|
+
] }), [V, tt] = p(50), [nt, rt] = p(!1), H = P.data?.timeCampusFocusPreferences, [it, at] = p("09:00"), [U, ot] = p("18:00"), [W, G] = p(90), [st, ct] = p(2), [lt, ut] = p(10), [dt, ft] = p(!0), [pt, mt] = p(""), [ht, gt] = p(""), [_t, vt] = p(!0), [yt, bt] = p(!0), [K, xt] = p(5), q = e();
|
|
66
|
+
u(() => {
|
|
67
|
+
H && (at(c(H.workdayStartMinute)), ot(c(H.workdayEndMinute)), G(H.preferredBlockMinutes), ct(H.maxBlocksPerDay), ut(H.meetingBufferMinutes), ft(H.blockingEnabled), mt(H.blockedDomains.join("\n")), gt(H.blockedApps.join("\n")), vt(H.doNotDisturb), bt(H.calendarHoldEnabled), xt(H.startNudgeMinutes));
|
|
67
68
|
}, [H]);
|
|
68
|
-
let
|
|
69
|
-
async function
|
|
69
|
+
let J = j.data?.timeCampusActiveFocusSession ?? null, St = M.data?.timeCampusFocusBlockSuggestions ?? [], Ct = N.data?.timeCampusFocusBlocks ?? [], Y = Ye.data?.timeCampusFocusSummary, X = Je.data?.timeCampusFocusCalendarConnection, wt = ye(X?.provider), Tt = !j.data && j.loading || !P.data && P.loading, Et = j.error ?? P.error;
|
|
70
|
+
async function Z(e, t) {
|
|
70
71
|
try {
|
|
71
|
-
await e(),
|
|
72
|
+
await e(), _e(), D({
|
|
72
73
|
title: t,
|
|
73
74
|
variant: "success"
|
|
74
75
|
});
|
|
75
76
|
} catch (e) {
|
|
76
|
-
|
|
77
|
-
title:
|
|
77
|
+
D({
|
|
78
|
+
title: T(e),
|
|
78
79
|
variant: "error"
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
let Dt = (e) =>
|
|
83
|
-
plannedDurationSeconds: e ? void 0 :
|
|
84
|
-
protectionLevel:
|
|
83
|
+
let Dt = (e) => Z(() => I({ variables: {
|
|
84
|
+
plannedDurationSeconds: e ? void 0 : V * 60,
|
|
85
|
+
protectionLevel: nt ? a.Strict : a.Standard,
|
|
85
86
|
focusBlockId: e
|
|
86
|
-
} }), "Focus session started"),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
t ?
|
|
87
|
+
} }), "Focus session started"), Ot = f(!1), kt = f(() => void 0);
|
|
88
|
+
u(() => {
|
|
89
|
+
kt.current = (e, t) => {
|
|
90
|
+
t ? D({
|
|
90
91
|
title: "A focus session is already running",
|
|
91
92
|
variant: "info"
|
|
92
|
-
}) :
|
|
93
|
+
}) : Z(() => I({ variables: { focusBlockId: e } }), "Focus block started");
|
|
93
94
|
};
|
|
94
|
-
}),
|
|
95
|
-
if (
|
|
95
|
+
}), u(() => {
|
|
96
|
+
if (Ot.current || !C || !j.data) return;
|
|
96
97
|
let e = Ee(window.location.search);
|
|
97
|
-
e && (
|
|
98
|
-
}, [
|
|
99
|
-
let
|
|
100
|
-
id:
|
|
98
|
+
e && (Ot.current = !0, window.history.replaceState(window.history.state, "", ke(window.location.href)), kt.current(e, !!j.data.timeCampusActiveFocusSession));
|
|
99
|
+
}, [C, j.data]);
|
|
100
|
+
let At = (e) => J ? Z(() => Xe({ variables: {
|
|
101
|
+
id: J.id,
|
|
101
102
|
status: e
|
|
102
|
-
} }), e === o.Completed ? "Focus session completed" : "Focus session abandoned") : void 0, Q = (e, t) =>
|
|
103
|
+
} }), e === o.Completed ? "Focus session completed" : "Focus session abandoned") : void 0, Q = (e, t) => Z(() => Qe({ variables: { input: {
|
|
103
104
|
startTime: e.startTime,
|
|
104
105
|
endTime: e.endTime,
|
|
105
106
|
response: t,
|
|
106
|
-
dayStart:
|
|
107
|
+
dayStart: A.toISOString(),
|
|
107
108
|
snoozeMinutes: t === i.Snooze ? 30 : null
|
|
108
|
-
} } }), t === i.Accept ? "Focus block scheduled" : t === i.Snooze ? "Snoozed for 30 minutes" : "Suggestion dismissed"),
|
|
109
|
-
let e =
|
|
110
|
-
e === null || t === null ?
|
|
109
|
+
} } }), t === i.Accept ? "Focus block scheduled" : t === i.Snooze ? "Snoozed for 30 minutes" : "Suggestion dismissed"), jt = () => {
|
|
110
|
+
let e = l(it), t = l(U);
|
|
111
|
+
e === null || t === null ? D({
|
|
111
112
|
title: "Use HH:MM for the workday",
|
|
112
113
|
variant: "error"
|
|
113
|
-
}) :
|
|
114
|
+
}) : Z(() => et({ variables: { input: {
|
|
114
115
|
workdayStartMinute: e,
|
|
115
116
|
workdayEndMinute: t,
|
|
116
117
|
preferredBlockMinutes: W,
|
|
@@ -122,232 +123,232 @@ function k() {
|
|
|
122
123
|
blockedApps: we(ht),
|
|
123
124
|
doNotDisturb: _t,
|
|
124
125
|
calendarHoldEnabled: yt,
|
|
125
|
-
startNudgeMinutes:
|
|
126
|
+
startNudgeMinutes: K
|
|
126
127
|
} } }), "Focus settings saved");
|
|
127
128
|
};
|
|
128
|
-
if (Tt) return /* @__PURE__ */
|
|
129
|
-
title:
|
|
130
|
-
description:
|
|
131
|
-
children: /* @__PURE__ */
|
|
129
|
+
if (Tt) return /* @__PURE__ */ g(t, {
|
|
130
|
+
title: v,
|
|
131
|
+
description: y,
|
|
132
|
+
children: /* @__PURE__ */ g(ee, {
|
|
132
133
|
variant: "card",
|
|
133
134
|
count: 4
|
|
134
135
|
})
|
|
135
136
|
});
|
|
136
|
-
if (Et && !
|
|
137
|
-
title:
|
|
138
|
-
description:
|
|
139
|
-
children: /* @__PURE__ */
|
|
137
|
+
if (Et && !j.data) return /* @__PURE__ */ g(t, {
|
|
138
|
+
title: v,
|
|
139
|
+
description: y,
|
|
140
|
+
children: /* @__PURE__ */ g("div", {
|
|
140
141
|
className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
|
|
141
142
|
children: "Failed to load focus protection. Please try again later."
|
|
142
143
|
})
|
|
143
144
|
});
|
|
144
|
-
let $ =
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
title:
|
|
147
|
-
description:
|
|
145
|
+
let $ = J ? Ce(J.startTime, J.plannedDurationSeconds, k) : null, Mt = Y ? Math.round(Y.averageProtectionRatio * 100) : null;
|
|
146
|
+
return /* @__PURE__ */ _(t, {
|
|
147
|
+
title: v,
|
|
148
|
+
description: y,
|
|
148
149
|
purpose: "Protect the hours that matter: TimeCampus suggests focus blocks around your meetings and the times you focus best, and blocks distracting sites in your browser, and in the desktop app turns on Do Not Disturb and hides distracting apps while a session runs.",
|
|
149
150
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
toasts:
|
|
152
|
-
onDismiss:
|
|
151
|
+
/* @__PURE__ */ g(te, {
|
|
152
|
+
toasts: E,
|
|
153
|
+
onDismiss: Ue
|
|
153
154
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ _("div", {
|
|
155
156
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
156
157
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ g(n, {
|
|
158
159
|
featured: !0,
|
|
159
160
|
title: "Protected Time",
|
|
160
|
-
value:
|
|
161
|
-
icon: /* @__PURE__ */
|
|
161
|
+
value: Y ? s(Y.totalProtectedSeconds) : "--",
|
|
162
|
+
icon: /* @__PURE__ */ g(Fe, { className: "h-5 w-5" }),
|
|
162
163
|
description: "Last 7 days"
|
|
163
164
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ g(n, {
|
|
165
166
|
title: "Protection Ratio",
|
|
166
|
-
value:
|
|
167
|
-
icon: /* @__PURE__ */
|
|
167
|
+
value: Mt === null ? "--" : `${Mt}%`,
|
|
168
|
+
icon: /* @__PURE__ */ g(Pe, { className: "h-5 w-5" }),
|
|
168
169
|
description: "Protected vs interrupted"
|
|
169
170
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ g(n, {
|
|
171
172
|
title: "Sessions",
|
|
172
|
-
value:
|
|
173
|
-
icon: /* @__PURE__ */
|
|
174
|
-
description:
|
|
173
|
+
value: Y ? String(Y.totalSessions) : "--",
|
|
174
|
+
icon: /* @__PURE__ */ g(Le, { className: "h-5 w-5" }),
|
|
175
|
+
description: Y ? `${Y.completedSessions} completed` : "Last 7 days"
|
|
175
176
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ g(n, {
|
|
177
178
|
title: "Interruptions",
|
|
178
|
-
value:
|
|
179
|
-
icon: /* @__PURE__ */
|
|
179
|
+
value: Y ? String(Y.totalInterruptionCount) : "--",
|
|
180
|
+
icon: /* @__PURE__ */ g(m, { className: "h-5 w-5" }),
|
|
180
181
|
description: "Logged, detected or bypassed"
|
|
181
182
|
})
|
|
182
183
|
]
|
|
183
184
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ g("div", {
|
|
185
186
|
className: "mt-6",
|
|
186
187
|
"data-testid": "focus-session-card",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ _(Be, {
|
|
188
189
|
treatment: "glass",
|
|
189
190
|
glow: !0,
|
|
190
191
|
className: "p-6",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ _("div", {
|
|
192
193
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("h3", {
|
|
194
195
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
196
|
-
}),
|
|
196
|
+
children: [/* @__PURE__ */ g(Pe, { className: "h-4 w-4" }), "Focus session"]
|
|
197
|
+
}), J ? /* @__PURE__ */ _("p", {
|
|
197
198
|
className: "mt-1 text-sm text-text-secondary",
|
|
198
199
|
"data-testid": "focus-session-status",
|
|
199
200
|
children: [
|
|
200
201
|
$ === null ? "Open-ended session in progress." : $ === 0 ? "Planned time is up — finish when you're ready." : `${$} minute${$ === 1 ? "" : "s"} left.`,
|
|
201
202
|
" ",
|
|
202
|
-
|
|
203
|
+
J.interruptionCount,
|
|
203
204
|
" interruption",
|
|
204
|
-
|
|
205
|
+
J.interruptionCount === 1 ? "" : "s",
|
|
205
206
|
",",
|
|
206
207
|
" ",
|
|
207
|
-
|
|
208
|
+
J.blockedAttemptCount,
|
|
208
209
|
" distraction",
|
|
209
|
-
|
|
210
|
+
J.blockedAttemptCount === 1 ? "" : "s",
|
|
210
211
|
" blocked."
|
|
211
212
|
]
|
|
212
|
-
}) : /* @__PURE__ */
|
|
213
|
+
}) : /* @__PURE__ */ g("p", {
|
|
213
214
|
className: "mt-1 text-sm text-text-secondary",
|
|
214
215
|
children: "No session running. While one is active, the TimeCampus browser extension blocks the sites listed below and the TimeCampus desktop app hides or flags the apps listed below."
|
|
215
|
-
})] }),
|
|
216
|
-
variant:
|
|
217
|
-
label:
|
|
216
|
+
})] }), J && /* @__PURE__ */ g(r, {
|
|
217
|
+
variant: J.protectionLevel === a.Strict ? "warning" : "success",
|
|
218
|
+
label: J.protectionLevel === a.Strict ? "Strict" : "Standard"
|
|
218
219
|
})]
|
|
219
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ g("div", {
|
|
220
221
|
className: "mt-4 flex flex-wrap items-center gap-3",
|
|
221
|
-
children:
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
children: J ? /* @__PURE__ */ _(ze, { children: [
|
|
223
|
+
/* @__PURE__ */ _("button", {
|
|
223
224
|
type: "button",
|
|
224
|
-
className:
|
|
225
|
-
disabled:
|
|
226
|
-
onClick: () =>
|
|
225
|
+
className: x,
|
|
226
|
+
disabled: R,
|
|
227
|
+
onClick: () => At(o.Completed),
|
|
227
228
|
"data-testid": "focus-end",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ g(Ie, { className: "h-4 w-4" }), " End session"]
|
|
229
230
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ g("button", {
|
|
231
232
|
type: "button",
|
|
232
|
-
className:
|
|
233
|
-
disabled:
|
|
234
|
-
onClick: () =>
|
|
233
|
+
className: S,
|
|
234
|
+
disabled: R,
|
|
235
|
+
onClick: () => At(o.Abandoned),
|
|
235
236
|
children: "Abandon"
|
|
236
237
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ g("button", {
|
|
238
239
|
type: "button",
|
|
239
|
-
className:
|
|
240
|
-
onClick: () =>
|
|
240
|
+
className: S,
|
|
241
|
+
onClick: () => Z(() => Ze({ variables: { focusSessionId: J.id } }), "Interruption logged"),
|
|
241
242
|
"data-testid": "focus-log-interruption",
|
|
242
243
|
children: "Log an interruption"
|
|
243
244
|
})
|
|
244
|
-
] }) : /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
245
|
+
] }) : /* @__PURE__ */ _(ze, { children: [
|
|
246
|
+
/* @__PURE__ */ _("label", {
|
|
246
247
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
247
|
-
children: ["Length", /* @__PURE__ */
|
|
248
|
-
className:
|
|
249
|
-
value:
|
|
250
|
-
onChange: (e) =>
|
|
248
|
+
children: ["Length", /* @__PURE__ */ _(Ve, {
|
|
249
|
+
className: b,
|
|
250
|
+
value: V,
|
|
251
|
+
onChange: (e) => tt(Number(e.target.value)),
|
|
251
252
|
"data-testid": "focus-length",
|
|
252
253
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ g("option", {
|
|
254
255
|
value: 25,
|
|
255
256
|
children: "25 min"
|
|
256
257
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ g("option", {
|
|
258
259
|
value: 50,
|
|
259
260
|
children: "50 min"
|
|
260
261
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ g("option", {
|
|
262
263
|
value: 90,
|
|
263
264
|
children: "90 min"
|
|
264
265
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ g("option", {
|
|
266
267
|
value: 120,
|
|
267
268
|
children: "2 hours"
|
|
268
269
|
})
|
|
269
270
|
]
|
|
270
271
|
})]
|
|
271
272
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ _("label", {
|
|
273
274
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ g("input", {
|
|
275
276
|
type: "checkbox",
|
|
276
|
-
checked:
|
|
277
|
-
onChange: (e) =>
|
|
277
|
+
checked: nt,
|
|
278
|
+
onChange: (e) => rt(e.target.checked),
|
|
278
279
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
279
280
|
}), "Strict (no “continue anyway”)"]
|
|
280
281
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ _("button", {
|
|
282
283
|
type: "button",
|
|
283
|
-
className:
|
|
284
|
-
disabled:
|
|
284
|
+
className: x,
|
|
285
|
+
disabled: L,
|
|
285
286
|
onClick: () => Dt(),
|
|
286
287
|
"data-testid": "focus-start",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ g(h, { className: "h-4 w-4" }), " Start focus session"]
|
|
288
289
|
})
|
|
289
290
|
] })
|
|
290
291
|
})]
|
|
291
292
|
})
|
|
292
293
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ _("div", {
|
|
294
295
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ _("div", {
|
|
296
297
|
className: "rounded-xl border border-border-seam bg-bg-surface p-6 shadow-elevation-1",
|
|
297
298
|
"data-testid": "focus-suggestions",
|
|
298
299
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ _("div", {
|
|
300
301
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ _("h3", {
|
|
302
303
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
304
|
-
}), /* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ g(Me, { className: "h-4 w-4" }), "Suggested focus blocks"]
|
|
305
|
+
}), /* @__PURE__ */ g("div", {
|
|
305
306
|
className: "flex gap-1",
|
|
306
307
|
role: "group",
|
|
307
308
|
"aria-label": "Day to plan",
|
|
308
|
-
children: ["Today", "Tomorrow"].map((e, t) => /* @__PURE__ */
|
|
309
|
+
children: ["Today", "Tomorrow"].map((e, t) => /* @__PURE__ */ g("button", {
|
|
309
310
|
type: "button",
|
|
310
|
-
"aria-pressed":
|
|
311
|
-
className:
|
|
312
|
-
onClick: () =>
|
|
311
|
+
"aria-pressed": O === t,
|
|
312
|
+
className: O === t ? x : S,
|
|
313
|
+
onClick: () => We(t),
|
|
313
314
|
children: e
|
|
314
315
|
}, e))
|
|
315
316
|
})]
|
|
316
317
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ g("p", {
|
|
318
319
|
className: "mt-1 text-xs text-text-secondary",
|
|
319
320
|
children: "Ranked from your peak hours, meetings and how well past sessions held up. Snoozed and dismissed slots are planned around."
|
|
320
321
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ _("div", {
|
|
322
323
|
className: "mt-4 space-y-3",
|
|
323
324
|
children: [
|
|
324
|
-
|
|
325
|
+
M.error && /* @__PURE__ */ g("p", {
|
|
325
326
|
className: "text-sm text-status-error-text",
|
|
326
|
-
children:
|
|
327
|
+
children: T(M.error)
|
|
327
328
|
}),
|
|
328
|
-
!
|
|
329
|
+
!M.error && M.data && St.length === 0 && /* @__PURE__ */ _("p", {
|
|
329
330
|
className: "text-sm text-text-secondary",
|
|
330
331
|
"data-testid": "focus-suggestions-empty",
|
|
331
332
|
children: [
|
|
332
333
|
"No free window left for",
|
|
333
334
|
" ",
|
|
334
|
-
|
|
335
|
+
O === 0 ? "today" : "tomorrow",
|
|
335
336
|
" — your day is full or you have scheduled your maximum blocks."
|
|
336
337
|
]
|
|
337
338
|
}),
|
|
338
|
-
St.map((e) => /* @__PURE__ */
|
|
339
|
+
St.map((e) => /* @__PURE__ */ _("div", {
|
|
339
340
|
className: "rounded-lg border border-border-subtle p-3",
|
|
340
341
|
"data-testid": "focus-suggestion",
|
|
341
342
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ _("div", {
|
|
343
344
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ _("span", {
|
|
345
346
|
className: "text-sm font-medium text-text-primary",
|
|
346
|
-
children: [
|
|
347
|
+
children: [xe(e.startTime, e.endTime), /* @__PURE__ */ g("span", {
|
|
347
348
|
className: "ms-2 text-xs text-text-secondary",
|
|
348
|
-
children:
|
|
349
|
+
children: s(e.durationMinutes * 60)
|
|
349
350
|
})]
|
|
350
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ _("span", {
|
|
351
352
|
className: "text-xs text-text-secondary",
|
|
352
353
|
children: [
|
|
353
354
|
"Fit ",
|
|
@@ -356,39 +357,39 @@ function k() {
|
|
|
356
357
|
]
|
|
357
358
|
})]
|
|
358
359
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ g("div", {
|
|
360
361
|
className: "mt-2 flex flex-wrap gap-1.5",
|
|
361
|
-
children: e.reasons.map((e) => /* @__PURE__ */
|
|
362
|
+
children: e.reasons.map((e) => /* @__PURE__ */ g(r, {
|
|
362
363
|
variant: "info",
|
|
363
364
|
label: De(e)
|
|
364
365
|
}, e))
|
|
365
366
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ _("div", {
|
|
367
368
|
className: "mt-3 flex flex-wrap gap-2",
|
|
368
369
|
children: [
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ _("button", {
|
|
370
371
|
type: "button",
|
|
371
|
-
className:
|
|
372
|
-
disabled:
|
|
372
|
+
className: x,
|
|
373
|
+
disabled: z,
|
|
373
374
|
onClick: () => Q(e, i.Accept),
|
|
374
375
|
"data-testid": "focus-suggestion-accept",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ g(Ne, { className: "h-4 w-4" }), " Accept"]
|
|
376
377
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ _("button", {
|
|
378
379
|
type: "button",
|
|
379
|
-
className:
|
|
380
|
-
disabled:
|
|
380
|
+
className: S,
|
|
381
|
+
disabled: z,
|
|
381
382
|
onClick: () => Q(e, i.Snooze),
|
|
382
383
|
"data-testid": "focus-suggestion-snooze",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ g(je, { className: "h-4 w-4" }), " Snooze 30 min"]
|
|
384
385
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ _("button", {
|
|
386
387
|
type: "button",
|
|
387
|
-
className:
|
|
388
|
-
disabled:
|
|
388
|
+
className: S,
|
|
389
|
+
disabled: z,
|
|
389
390
|
onClick: () => Q(e, i.Dismiss),
|
|
390
391
|
"data-testid": "focus-suggestion-dismiss",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ g(Re, { className: "h-4 w-4" }), " Dismiss"]
|
|
392
393
|
})
|
|
393
394
|
]
|
|
394
395
|
})
|
|
@@ -397,64 +398,64 @@ function k() {
|
|
|
397
398
|
]
|
|
398
399
|
})
|
|
399
400
|
]
|
|
400
|
-
}), /* @__PURE__ */
|
|
401
|
+
}), /* @__PURE__ */ _("div", {
|
|
401
402
|
className: "rounded-xl border border-border-seam bg-bg-surface p-6 shadow-elevation-1",
|
|
402
403
|
"data-testid": "focus-scheduled",
|
|
403
404
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ _("h3", {
|
|
405
406
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
406
407
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ g(Le, { className: "h-4 w-4" }),
|
|
408
409
|
"Scheduled (",
|
|
409
|
-
|
|
410
|
+
O === 0 ? "today" : "tomorrow",
|
|
410
411
|
")"
|
|
411
412
|
]
|
|
412
413
|
}),
|
|
413
|
-
|
|
414
|
+
X && /* @__PURE__ */ g("p", {
|
|
414
415
|
className: "mt-1 text-xs text-text-secondary",
|
|
415
416
|
"data-testid": "focus-calendar-connection",
|
|
416
|
-
children:
|
|
417
|
+
children: X.holdsEnabled ? X.connected ? `Accepted blocks are held as busy "Focus" time on ${X.calendarName ?? "your calendar"}${wt ? ` and sync to ${wt}` : ""}.` : X.reachable ? "No personal calendar yet. Create one in Calendar to hold accepted blocks there and plan around its events." : "Your calendar could not be reached just now; blocks are still scheduled here." : "Calendar holds are off — accepted blocks stay in TimeCampus only."
|
|
417
418
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ _("div", {
|
|
419
420
|
className: "mt-4 space-y-3",
|
|
420
|
-
children: [
|
|
421
|
+
children: [N.data && Ct.length === 0 && /* @__PURE__ */ g("p", {
|
|
421
422
|
className: "text-sm text-text-secondary",
|
|
422
423
|
children: "Accept a suggestion to put a focus block on your schedule."
|
|
423
424
|
}), Ct.map((e) => {
|
|
424
|
-
let t =
|
|
425
|
-
return /* @__PURE__ */
|
|
425
|
+
let t = ve(e.calendarHoldStatus, e.calendarId && e.calendarId === X?.calendarId ? X?.calendarName : null);
|
|
426
|
+
return /* @__PURE__ */ _("div", {
|
|
426
427
|
className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-subtle p-3",
|
|
427
428
|
"data-testid": "focus-scheduled-block",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
429
430
|
className: "text-sm font-medium text-text-primary",
|
|
430
|
-
children:
|
|
431
|
-
}), /* @__PURE__ */
|
|
431
|
+
children: xe(e.startTime, e.endTime)
|
|
432
|
+
}), /* @__PURE__ */ _("p", {
|
|
432
433
|
className: "text-xs text-text-secondary",
|
|
433
434
|
children: [
|
|
434
435
|
e.source === "ADAPTIVE" ? "Suggested" : "Manual",
|
|
435
436
|
" ·",
|
|
436
437
|
" ",
|
|
437
|
-
|
|
438
|
-
t && /* @__PURE__ */
|
|
438
|
+
s(e.durationMinutes * 60),
|
|
439
|
+
t && /* @__PURE__ */ _("span", {
|
|
439
440
|
"data-testid": "focus-block-calendar-hold",
|
|
440
441
|
children: [" · ", t]
|
|
441
442
|
})
|
|
442
443
|
]
|
|
443
|
-
})] }), e.status === "STARTED" ? /* @__PURE__ */
|
|
444
|
+
})] }), e.status === "STARTED" ? /* @__PURE__ */ g(r, {
|
|
444
445
|
variant: "success",
|
|
445
446
|
label: "Started"
|
|
446
|
-
}) : /* @__PURE__ */
|
|
447
|
+
}) : /* @__PURE__ */ _("div", {
|
|
447
448
|
className: "flex gap-2",
|
|
448
|
-
children: [!
|
|
449
|
+
children: [!J && be(e.endTime, k) && /* @__PURE__ */ _("button", {
|
|
449
450
|
type: "button",
|
|
450
|
-
className:
|
|
451
|
-
disabled:
|
|
451
|
+
className: x,
|
|
452
|
+
disabled: L,
|
|
452
453
|
onClick: () => Dt(e.id),
|
|
453
|
-
children: [/* @__PURE__ */
|
|
454
|
-
}), /* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ g(h, { className: "h-4 w-4" }), " Start"]
|
|
455
|
+
}), /* @__PURE__ */ g("button", {
|
|
455
456
|
type: "button",
|
|
456
|
-
className:
|
|
457
|
-
onClick: () =>
|
|
457
|
+
className: S,
|
|
458
|
+
onClick: () => Z(() => $e({ variables: { id: e.id } }), "Focus block canceled"),
|
|
458
459
|
"data-testid": "focus-block-cancel",
|
|
459
460
|
children: "Cancel"
|
|
460
461
|
})]
|
|
@@ -465,22 +466,22 @@ function k() {
|
|
|
465
466
|
]
|
|
466
467
|
})]
|
|
467
468
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ _("div", {
|
|
469
470
|
className: "mt-6 rounded-xl border border-border-seam bg-bg-surface p-6 shadow-elevation-1",
|
|
470
471
|
"data-testid": "focus-settings",
|
|
471
472
|
children: [
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ _("h3", {
|
|
473
474
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
474
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ g(m, { className: "h-4 w-4" }), "Distraction blocking and planning"]
|
|
475
476
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ _("div", {
|
|
477
478
|
className: "mt-4 grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ _("div", {
|
|
479
480
|
className: "space-y-3",
|
|
480
481
|
children: [
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ _("label", {
|
|
482
483
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
483
|
-
children: ["Block sites and apps during focus sessions", /* @__PURE__ */
|
|
484
|
+
children: ["Block sites and apps during focus sessions", /* @__PURE__ */ g("input", {
|
|
484
485
|
type: "checkbox",
|
|
485
486
|
checked: dt,
|
|
486
487
|
onChange: (e) => ft(e.target.checked),
|
|
@@ -488,41 +489,41 @@ function k() {
|
|
|
488
489
|
"data-testid": "focus-blocking-enabled"
|
|
489
490
|
})]
|
|
490
491
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ _("label", {
|
|
492
493
|
className: "block text-sm text-text-primary",
|
|
493
|
-
children: ["Blocked sites", /* @__PURE__ */
|
|
494
|
+
children: ["Blocked sites", /* @__PURE__ */ g("textarea", {
|
|
494
495
|
rows: 6,
|
|
495
496
|
value: pt,
|
|
496
497
|
onChange: (e) => mt(e.target.value),
|
|
497
|
-
className: `${
|
|
498
|
+
className: `${b} mt-1 w-full font-mono`,
|
|
498
499
|
"aria-describedby": "focus-sites-help",
|
|
499
500
|
"data-testid": "focus-blocked-sites"
|
|
500
501
|
})]
|
|
501
502
|
}),
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ g("p", {
|
|
503
504
|
id: "focus-sites-help",
|
|
504
505
|
className: "text-xs text-text-secondary",
|
|
505
506
|
children: "One site per line (subdomains are included). Blocking is enforced by the TimeCampus browser extension while a session is active; allow-listed apps on a session are never blocked."
|
|
506
507
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ _("label", {
|
|
508
509
|
className: "block text-sm text-text-primary",
|
|
509
|
-
children: ["Blocked desktop apps", /* @__PURE__ */
|
|
510
|
+
children: ["Blocked desktop apps", /* @__PURE__ */ g("textarea", {
|
|
510
511
|
rows: 5,
|
|
511
512
|
value: ht,
|
|
512
513
|
onChange: (e) => gt(e.target.value),
|
|
513
|
-
className: `${
|
|
514
|
+
className: `${b} mt-1 w-full font-mono`,
|
|
514
515
|
"aria-describedby": "focus-apps-help",
|
|
515
516
|
"data-testid": "focus-blocked-apps"
|
|
516
517
|
})]
|
|
517
518
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ g("p", {
|
|
519
520
|
id: "focus-apps-help",
|
|
520
521
|
className: "text-xs text-text-secondary",
|
|
521
522
|
children: "One app per line, as your computer names it (for example Discord or Steam). In the TimeCampus desktop app, strict sessions hide these apps and standard sessions warn you and count the time as an interruption."
|
|
522
523
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ _("label", {
|
|
524
525
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
525
|
-
children: ["Turn on Do Not Disturb during focus sessions", /* @__PURE__ */
|
|
526
|
+
children: ["Turn on Do Not Disturb during focus sessions", /* @__PURE__ */ g("input", {
|
|
526
527
|
type: "checkbox",
|
|
527
528
|
checked: _t,
|
|
528
529
|
onChange: (e) => vt(e.target.checked),
|
|
@@ -530,79 +531,75 @@ function k() {
|
|
|
530
531
|
"data-testid": "focus-do-not-disturb"
|
|
531
532
|
})]
|
|
532
533
|
}),
|
|
533
|
-
|
|
534
|
+
q && /* @__PURE__ */ _("p", {
|
|
534
535
|
className: "text-xs text-text-secondary",
|
|
535
536
|
"data-testid": "focus-desktop-status",
|
|
536
537
|
children: [
|
|
537
538
|
"This computer: Do Not Disturb",
|
|
538
539
|
" ",
|
|
539
|
-
|
|
540
|
+
w(q.doNotDisturb),
|
|
540
541
|
", app blocking",
|
|
541
542
|
" ",
|
|
542
|
-
|
|
543
|
+
w(q.appWatcher),
|
|
543
544
|
".",
|
|
544
|
-
|
|
545
|
+
q.detail ? ` ${q.detail}` : ""
|
|
545
546
|
]
|
|
546
547
|
})
|
|
547
548
|
]
|
|
548
|
-
}), /* @__PURE__ */
|
|
549
|
+
}), /* @__PURE__ */ _("div", {
|
|
549
550
|
className: "space-y-3",
|
|
550
551
|
children: [
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ _("div", {
|
|
552
553
|
className: "flex items-center justify-between gap-4",
|
|
553
|
-
children: [/* @__PURE__ */
|
|
554
|
+
children: [/* @__PURE__ */ g("span", {
|
|
554
555
|
className: "text-sm text-text-primary",
|
|
555
556
|
children: "Workday"
|
|
556
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ _("span", {
|
|
557
558
|
className: "flex items-center gap-2",
|
|
558
559
|
children: [
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
className: C,
|
|
564
|
-
"aria-label": "Workday start"
|
|
560
|
+
/* @__PURE__ */ g(Ae, {
|
|
561
|
+
value: it,
|
|
562
|
+
onChange: at,
|
|
563
|
+
label: "Workday start"
|
|
565
564
|
}),
|
|
566
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ g("span", {
|
|
567
566
|
className: "text-text-secondary",
|
|
568
567
|
children: "to"
|
|
569
568
|
}),
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
type: "time",
|
|
569
|
+
/* @__PURE__ */ g(Ae, {
|
|
572
570
|
value: U === "24:00" ? "23:59" : U,
|
|
573
|
-
onChange:
|
|
574
|
-
|
|
575
|
-
"aria-label": "Workday end"
|
|
571
|
+
onChange: ot,
|
|
572
|
+
label: "Workday end"
|
|
576
573
|
})
|
|
577
574
|
]
|
|
578
575
|
})]
|
|
579
576
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ _("label", {
|
|
581
578
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
582
|
-
children: ["Preferred block length (minutes)", /* @__PURE__ */
|
|
579
|
+
children: ["Preferred block length (minutes)", /* @__PURE__ */ g("input", {
|
|
583
580
|
type: "number",
|
|
584
581
|
min: 15,
|
|
585
582
|
max: 240,
|
|
586
583
|
step: 15,
|
|
587
584
|
value: W,
|
|
588
|
-
onChange: (e) =>
|
|
589
|
-
className: `${
|
|
585
|
+
onChange: (e) => G(Number(e.target.value)),
|
|
586
|
+
className: `${b} w-24 text-end`
|
|
590
587
|
})]
|
|
591
588
|
}),
|
|
592
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ _("label", {
|
|
593
590
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
594
|
-
children: ["Focus blocks per day", /* @__PURE__ */
|
|
591
|
+
children: ["Focus blocks per day", /* @__PURE__ */ g("input", {
|
|
595
592
|
type: "number",
|
|
596
593
|
min: 1,
|
|
597
594
|
max: 6,
|
|
598
595
|
value: st,
|
|
599
596
|
onChange: (e) => ct(Number(e.target.value)),
|
|
600
|
-
className: `${
|
|
597
|
+
className: `${b} w-24 text-end`
|
|
601
598
|
})]
|
|
602
599
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ _("label", {
|
|
604
601
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
605
|
-
children: ["Hold accepted blocks on my calendar", /* @__PURE__ */
|
|
602
|
+
children: ["Hold accepted blocks on my calendar", /* @__PURE__ */ g("input", {
|
|
606
603
|
type: "checkbox",
|
|
607
604
|
checked: yt,
|
|
608
605
|
onChange: (e) => bt(e.target.checked),
|
|
@@ -610,43 +607,43 @@ function k() {
|
|
|
610
607
|
"data-testid": "focus-calendar-hold"
|
|
611
608
|
})]
|
|
612
609
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ _("label", {
|
|
614
611
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
615
|
-
children: ["Remind me before a block starts", /* @__PURE__ */
|
|
616
|
-
value:
|
|
612
|
+
children: ["Remind me before a block starts", /* @__PURE__ */ g(Ve, {
|
|
613
|
+
value: K,
|
|
617
614
|
onChange: (e) => xt(Number(e.target.value)),
|
|
618
|
-
className:
|
|
615
|
+
className: b,
|
|
619
616
|
"data-testid": "focus-start-nudge",
|
|
620
|
-
children: Oe(
|
|
617
|
+
children: Oe(K).map((e) => /* @__PURE__ */ g("option", {
|
|
621
618
|
value: e.value,
|
|
622
619
|
children: e.label
|
|
623
620
|
}, e.value))
|
|
624
621
|
})]
|
|
625
622
|
}),
|
|
626
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ _("label", {
|
|
627
624
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
628
|
-
children: ["Buffer around meetings (minutes)", /* @__PURE__ */
|
|
625
|
+
children: ["Buffer around meetings (minutes)", /* @__PURE__ */ g("input", {
|
|
629
626
|
type: "number",
|
|
630
627
|
min: 0,
|
|
631
628
|
max: 60,
|
|
632
629
|
step: 5,
|
|
633
630
|
value: lt,
|
|
634
631
|
onChange: (e) => ut(Number(e.target.value)),
|
|
635
|
-
className: `${
|
|
632
|
+
className: `${b} w-24 text-end`
|
|
636
633
|
})]
|
|
637
634
|
})
|
|
638
635
|
]
|
|
639
636
|
})]
|
|
640
637
|
}),
|
|
641
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ g("div", {
|
|
642
639
|
className: "mt-4 flex justify-end",
|
|
643
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ g("button", {
|
|
644
641
|
type: "button",
|
|
645
|
-
className:
|
|
646
|
-
disabled:
|
|
647
|
-
onClick:
|
|
642
|
+
className: x,
|
|
643
|
+
disabled: B,
|
|
644
|
+
onClick: jt,
|
|
648
645
|
"data-testid": "focus-save-settings",
|
|
649
|
-
children:
|
|
646
|
+
children: B ? "Saving..." : "Save focus settings"
|
|
650
647
|
})
|
|
651
648
|
})
|
|
652
649
|
]
|
|
@@ -654,6 +651,6 @@ function k() {
|
|
|
654
651
|
]
|
|
655
652
|
});
|
|
656
653
|
}
|
|
657
|
-
export {
|
|
654
|
+
export { E as FocusProtectionPage };
|
|
658
655
|
|
|
659
656
|
//# sourceMappingURL=FocusProtectionPage.js.map
|