@burdenoff/microfe-workspaces 2026.802.1 → 2026.829.1
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-operations.js +44 -1
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/wspace-operations.js +18 -18
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/hooks/useWorkspaceMutations.js +84 -61
- package/dist/hooks/useWorkspaceMutations.js.map +1 -1
- package/dist/pages/MembersListPage.js +3 -3
- package/dist/pages/MembersListPage.js.map +1 -1
- package/dist/pages/ProjectsListPage.js +3 -3
- package/dist/pages/ProjectsListPage.js.map +1 -1
- package/dist/pages/WorkspaceDetailPage.js +152 -114
- package/dist/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/pages/WorkspaceInvitePage.js +2 -2
- package/dist/pages/WorkspaceInvitePage.js.map +1 -1
- package/dist/pages/dashboard/DashboardCustomizer.js +62 -62
- package/dist/pages/dashboard/DashboardCustomizer.js.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +88 -69
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/config.js +77 -1
- package/dist/pages/dashboard/config.js.map +1 -1
- package/dist/pages/dashboard/widgets/AgentsWidget.js +56 -54
- package/dist/pages/dashboard/widgets/AgentsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/GroupsWidget.js +29 -31
- package/dist/pages/dashboard/widgets/GroupsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/MembersWidget.js +33 -33
- package/dist/pages/dashboard/widgets/MembersWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +42 -44
- package/dist/pages/dashboard/widgets/ProjectsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +171 -161
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +54 -44
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/SessionsWidget.js +57 -41
- package/dist/pages/dashboard/widgets/SessionsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/StorageWidget.js +52 -54
- package/dist/pages/dashboard/widgets/StorageWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +28 -30
- package/dist/pages/dashboard/widgets/TagCloudWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/TipsWidget.js +141 -131
- package/dist/pages/dashboard/widgets/TipsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +46 -40
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/VibesWidget.js +44 -34
- package/dist/pages/dashboard/widgets/VibesWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +43 -41
- package/dist/pages/dashboard/widgets/WelcomeWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +68 -62
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +50 -44
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +59 -49
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +35 -33
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,155 +1,165 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { tWithFallback as e } from "../../../utils/i18n.js";
|
|
2
|
+
import { WidgetWrapper as t } from "../WidgetWrapper.js";
|
|
3
|
+
import { BookOpen as n, ExternalLink as r, GitBranch as i, LayoutTemplate as a, Lightbulb as o, Newspaper as s, Puzzle as c, Rocket as l, ScrollText as u, Shield as d, Sparkles as f, Users as p, Workflow as m } from "lucide-react";
|
|
4
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
5
|
+
import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
4
6
|
//#region src/pages/dashboard/widgets/TipsWidget.tsx
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
icon: c,
|
|
47
|
-
title: "Create your first workspace",
|
|
48
|
-
description: "Organize your team with a dedicated workspace.",
|
|
49
|
-
href: "/workspaces/list",
|
|
50
|
-
color: "text-accent-blue"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
icon: p,
|
|
54
|
-
title: "Automate with workflows",
|
|
55
|
-
description: "Build automation workflows to streamline your processes.",
|
|
56
|
-
href: "/workflows",
|
|
57
|
-
color: "text-status-success-text"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
icon: u,
|
|
61
|
-
title: "Set up permissions",
|
|
62
|
-
description: "Configure role-based access for your workspace members.",
|
|
63
|
-
href: "/rbac",
|
|
64
|
-
color: "text-accent-purple"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
icon: t,
|
|
68
|
-
title: "Explore the API",
|
|
69
|
-
description: "Check out our developer portal for API documentation.",
|
|
70
|
-
href: "/devportal",
|
|
71
|
-
color: "text-status-warning-text"
|
|
72
|
-
}
|
|
73
|
-
], v = [
|
|
74
|
-
{
|
|
75
|
-
icon: r,
|
|
76
|
-
title: "Build your first workflow",
|
|
77
|
-
description: "Drag nodes onto the canvas to automate a process end to end.",
|
|
78
|
-
href: "/workflows/new",
|
|
79
|
-
color: "text-accent-blue"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
icon: i,
|
|
83
|
-
title: "Start from a template",
|
|
84
|
-
description: "Skip the blank canvas with a ready-made workflow template.",
|
|
85
|
-
href: "/workflows/templates",
|
|
86
|
-
color: "text-status-success-text"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
icon: l,
|
|
90
|
-
title: "Debug a failed run",
|
|
91
|
-
description: "Inspect node-by-node execution logs for any workflow run.",
|
|
92
|
-
href: "/workflows/runs",
|
|
93
|
-
color: "text-accent-purple"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
icon: t,
|
|
97
|
-
title: "Read the docs",
|
|
98
|
-
description: "Guides and node reference at docs.fluidgrids.com.",
|
|
99
|
-
href: "https://docs.fluidgrids.com",
|
|
100
|
-
external: !0,
|
|
101
|
-
color: "text-status-warning-text"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
icon: f,
|
|
105
|
-
title: "Join the community",
|
|
106
|
-
description: "Share workflows and get help from other builders.",
|
|
107
|
-
href: "https://community.fluidgrids.com",
|
|
108
|
-
external: !0,
|
|
109
|
-
color: "text-accent-pink"
|
|
110
|
-
}
|
|
111
|
-
];
|
|
112
|
-
function y(e) {
|
|
113
|
-
return e === "vibecontrols" ? g : e === "fluidgrids" ? v : _;
|
|
7
|
+
function v(t) {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
icon: n,
|
|
11
|
+
title: e(t, "dashboard.tips.vibecontrols.readDocs.title", "Read the docs"),
|
|
12
|
+
description: e(t, "dashboard.tips.vibecontrols.readDocs.description", "Guides, references, and tutorials at docs.vibecontrols.com."),
|
|
13
|
+
href: "https://docs.vibecontrols.com",
|
|
14
|
+
external: !0,
|
|
15
|
+
color: "text-accent-blue"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
icon: p,
|
|
19
|
+
title: e(t, "dashboard.tips.vibecontrols.community.title", "Join the community"),
|
|
20
|
+
description: e(t, "dashboard.tips.vibecontrols.community.description", "Ask questions, share workflows, and chat with the team."),
|
|
21
|
+
href: "https://community.vibecontrols.com",
|
|
22
|
+
external: !0,
|
|
23
|
+
color: "text-accent-purple"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
icon: c,
|
|
27
|
+
title: e(t, "dashboard.tips.vibecontrols.plugins.title", "Browse plugins"),
|
|
28
|
+
description: e(t, "dashboard.tips.vibecontrols.plugins.description", "50+ plugins for terminals, AI, tunnels, sandboxes, and more."),
|
|
29
|
+
href: "/vibecontrols/plugins",
|
|
30
|
+
color: "text-status-success-text"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
icon: s,
|
|
34
|
+
title: e(t, "dashboard.tips.vibecontrols.blog.title", "Latest from the blog"),
|
|
35
|
+
description: e(t, "dashboard.tips.vibecontrols.blog.description", "Product updates, deep dives, and engineering posts."),
|
|
36
|
+
href: "https://vibecontrols.com/blog",
|
|
37
|
+
external: !0,
|
|
38
|
+
color: "text-status-warning-text"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
icon: f,
|
|
42
|
+
title: e(t, "dashboard.tips.vibecontrols.featurePreviews.title", "Feature previews"),
|
|
43
|
+
description: e(t, "dashboard.tips.vibecontrols.featurePreviews.description", "Try opt-in features before they ship to everyone."),
|
|
44
|
+
href: "/feature-previews",
|
|
45
|
+
color: "text-accent-pink"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
114
48
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
49
|
+
function y(t) {
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
icon: l,
|
|
53
|
+
title: e(t, "dashboard.tips.workspaces.createWorkspace.title", "Create your first workspace"),
|
|
54
|
+
description: e(t, "dashboard.tips.workspaces.createWorkspace.description", "Organize your team with a dedicated workspace."),
|
|
55
|
+
href: "/workspaces/list",
|
|
56
|
+
color: "text-accent-blue"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
icon: m,
|
|
60
|
+
title: e(t, "dashboard.tips.workspaces.automateWorkflows.title", "Automate with workflows"),
|
|
61
|
+
description: e(t, "dashboard.tips.workspaces.automateWorkflows.description", "Build automation workflows to streamline your processes."),
|
|
62
|
+
href: "/workflows",
|
|
63
|
+
color: "text-status-success-text"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
icon: d,
|
|
67
|
+
title: e(t, "dashboard.tips.workspaces.permissions.title", "Set up permissions"),
|
|
68
|
+
description: e(t, "dashboard.tips.workspaces.permissions.description", "Configure role-based access for your workspace members."),
|
|
69
|
+
href: "/rbac",
|
|
70
|
+
color: "text-accent-purple"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
icon: n,
|
|
74
|
+
title: e(t, "dashboard.tips.workspaces.exploreApi.title", "Explore the API"),
|
|
75
|
+
description: e(t, "dashboard.tips.workspaces.exploreApi.description", "Check out our developer portal for API documentation."),
|
|
76
|
+
href: "/devportal",
|
|
77
|
+
color: "text-status-warning-text"
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
function b(t) {
|
|
82
|
+
return [
|
|
83
|
+
{
|
|
84
|
+
icon: i,
|
|
85
|
+
title: e(t, "dashboard.tips.fluidgrids.buildWorkflow.title", "Build your first workflow"),
|
|
86
|
+
description: e(t, "dashboard.tips.fluidgrids.buildWorkflow.description", "Drag nodes onto the canvas to automate a process end to end."),
|
|
87
|
+
href: "/workflows/new",
|
|
88
|
+
color: "text-accent-blue"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
icon: a,
|
|
92
|
+
title: e(t, "dashboard.tips.fluidgrids.template.title", "Start from a template"),
|
|
93
|
+
description: e(t, "dashboard.tips.fluidgrids.template.description", "Skip the blank canvas with a ready-made workflow template."),
|
|
94
|
+
href: "/workflows/templates",
|
|
95
|
+
color: "text-status-success-text"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
icon: u,
|
|
99
|
+
title: e(t, "dashboard.tips.fluidgrids.debugRun.title", "Debug a failed run"),
|
|
100
|
+
description: e(t, "dashboard.tips.fluidgrids.debugRun.description", "Inspect node-by-node execution logs for any workflow run."),
|
|
101
|
+
href: "/workflows/runs",
|
|
102
|
+
color: "text-accent-purple"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
icon: n,
|
|
106
|
+
title: e(t, "dashboard.tips.fluidgrids.readDocs.title", "Read the docs"),
|
|
107
|
+
description: e(t, "dashboard.tips.fluidgrids.readDocs.description", "Guides and node reference at docs.fluidgrids.com."),
|
|
108
|
+
href: "https://docs.fluidgrids.com",
|
|
109
|
+
external: !0,
|
|
110
|
+
color: "text-status-warning-text"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
icon: p,
|
|
114
|
+
title: e(t, "dashboard.tips.fluidgrids.community.title", "Join the community"),
|
|
115
|
+
description: e(t, "dashboard.tips.fluidgrids.community.description", "Share workflows and get help from other builders."),
|
|
116
|
+
href: "https://community.fluidgrids.com",
|
|
117
|
+
external: !0,
|
|
118
|
+
color: "text-accent-pink"
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
function x(e, t) {
|
|
123
|
+
return t === "vibecontrols" ? v(e) : t === "fluidgrids" ? b(e) : y(e);
|
|
124
|
+
}
|
|
125
|
+
function S({ navigate: n, isLoading: i, productId: a }) {
|
|
126
|
+
let { t: s } = _(), c = x(s, a);
|
|
127
|
+
return /* @__PURE__ */ h(t, {
|
|
128
|
+
title: e(s, "dashboard.tips.title", "Tips & Resources"),
|
|
129
|
+
icon: /* @__PURE__ */ h(o, { className: "size-4" }),
|
|
120
130
|
size: "small",
|
|
121
|
-
isLoading:
|
|
122
|
-
children: /* @__PURE__ */
|
|
131
|
+
isLoading: i,
|
|
132
|
+
children: /* @__PURE__ */ h("div", {
|
|
123
133
|
className: "space-y-2",
|
|
124
|
-
children:
|
|
134
|
+
children: c.map((e) => e.external ? /* @__PURE__ */ g("a", {
|
|
125
135
|
href: e.href,
|
|
126
136
|
target: "_blank",
|
|
127
137
|
rel: "noopener noreferrer",
|
|
128
138
|
className: "w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 transition-colors text-left",
|
|
129
139
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ h(e.icon, { className: `size-4 mt-0.5 shrink-0 ${e.color}` }),
|
|
141
|
+
/* @__PURE__ */ g("div", {
|
|
132
142
|
className: "min-w-0",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ h("p", {
|
|
134
144
|
className: "text-xs font-medium text-text-primary leading-tight",
|
|
135
145
|
children: e.title
|
|
136
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ h("p", {
|
|
137
147
|
className: "text-[11px] text-text-secondary leading-tight mt-0.5",
|
|
138
148
|
children: e.description
|
|
139
149
|
})]
|
|
140
150
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ h(r, { className: "size-3 text-text-secondary shrink-0 mt-0.5" })
|
|
142
152
|
]
|
|
143
|
-
}, e.title) : /* @__PURE__ */
|
|
153
|
+
}, e.title) : /* @__PURE__ */ g("button", {
|
|
144
154
|
type: "button",
|
|
145
155
|
className: "w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 cursor-pointer transition-colors text-left",
|
|
146
|
-
onClick: () =>
|
|
147
|
-
children: [/* @__PURE__ */
|
|
156
|
+
onClick: () => n(e.href),
|
|
157
|
+
children: [/* @__PURE__ */ h(e.icon, { className: `size-4 mt-0.5 shrink-0 ${e.color}` }), /* @__PURE__ */ g("div", {
|
|
148
158
|
className: "min-w-0",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ h("p", {
|
|
150
160
|
className: "text-xs font-medium text-text-primary leading-tight",
|
|
151
161
|
children: e.title
|
|
152
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ h("p", {
|
|
153
163
|
className: "text-[11px] text-text-secondary leading-tight mt-0.5",
|
|
154
164
|
children: e.description
|
|
155
165
|
})]
|
|
@@ -159,6 +169,6 @@ function b({ navigate: t, isLoading: r, productId: i }) {
|
|
|
159
169
|
});
|
|
160
170
|
}
|
|
161
171
|
//#endregion
|
|
162
|
-
export {
|
|
172
|
+
export { S as TipsWidget };
|
|
163
173
|
|
|
164
174
|
//# sourceMappingURL=TipsWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TipsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/TipsWidget.tsx"],"sourcesContent":["import type { LucideIcon } from 'lucide-react';\nimport {\n Lightbulb,\n ExternalLink,\n BookOpen,\n Rocket,\n Shield,\n Workflow,\n Users,\n Puzzle,\n Newspaper,\n Sparkles,\n GitBranch,\n LayoutTemplate,\n ScrollText,\n} from 'lucide-react';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\ninterface Tip {\n icon: LucideIcon;\n title: string;\n description: string;\n href: string;\n external?: boolean;\n color: string;\n}\n\nconst VIBECONTROLS_TIPS: Tip[] = [\n {\n icon: BookOpen,\n title: 'Read the docs',\n description: 'Guides, references, and tutorials at docs.vibecontrols.com.',\n href: 'https://docs.vibecontrols.com',\n external: true,\n color: 'text-accent-blue',\n },\n {\n icon: Users,\n title: 'Join the community',\n description: 'Ask questions, share workflows, and chat with the team.',\n href: 'https://community.vibecontrols.com',\n external: true,\n color: 'text-accent-purple',\n },\n {\n icon: Puzzle,\n title: 'Browse plugins',\n description: '50+ plugins for terminals, AI, tunnels, sandboxes, and more.',\n href: '/vibecontrols/plugins',\n color: 'text-status-success-text',\n },\n {\n icon: Newspaper,\n title: 'Latest from the blog',\n description: 'Product updates, deep dives, and engineering posts.',\n href: 'https://vibecontrols.com/blog',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Sparkles,\n title: 'Feature previews',\n description: 'Try opt-in features before they ship to everyone.',\n href: '/feature-previews',\n color: 'text-accent-pink',\n },\n];\n\nconst WORKSPACES_TIPS: Tip[] = [\n {\n icon: Rocket,\n title: 'Create your first workspace',\n description: 'Organize your team with a dedicated workspace.',\n href: '/workspaces/list',\n color: 'text-accent-blue',\n },\n {\n icon: Workflow,\n title: 'Automate with workflows',\n description: 'Build automation workflows to streamline your processes.',\n href: '/workflows',\n color: 'text-status-success-text',\n },\n {\n icon: Shield,\n title: 'Set up permissions',\n description: 'Configure role-based access for your workspace members.',\n href: '/rbac',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: 'Explore the API',\n description: 'Check out our developer portal for API documentation.',\n href: '/devportal',\n color: 'text-status-warning-text',\n },\n];\n\nconst FLUIDGRIDS_TIPS: Tip[] = [\n {\n icon: GitBranch,\n title: 'Build your first workflow',\n description: 'Drag nodes onto the canvas to automate a process end to end.',\n href: '/workflows/new',\n color: 'text-accent-blue',\n },\n {\n icon: LayoutTemplate,\n title: 'Start from a template',\n description: 'Skip the blank canvas with a ready-made workflow template.',\n href: '/workflows/templates',\n color: 'text-status-success-text',\n },\n {\n icon: ScrollText,\n title: 'Debug a failed run',\n description: 'Inspect node-by-node execution logs for any workflow run.',\n href: '/workflows/runs',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: 'Read the docs',\n description: 'Guides and node reference at docs.fluidgrids.com.',\n href: 'https://docs.fluidgrids.com',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Users,\n title: 'Join the community',\n description: 'Share workflows and get help from other builders.',\n href: 'https://community.fluidgrids.com',\n external: true,\n color: 'text-accent-pink',\n },\n];\n\nfunction pickTips(productId?: string): Tip[] {\n if (productId === 'vibecontrols') return VIBECONTROLS_TIPS;\n if (productId === 'fluidgrids') return FLUIDGRIDS_TIPS;\n return WORKSPACES_TIPS;\n}\n\nexport function TipsWidget({ navigate, isLoading, productId }: WidgetProps) {\n const tips = pickTips(productId);\n\n return (\n <WidgetWrapper\n title=\"Tips & Resources\"\n icon={<Lightbulb className=\"size-4\" />}\n size=\"small\"\n isLoading={isLoading}\n >\n <div className=\"space-y-2\">\n {tips.map((tip) =>\n tip.external ? (\n <a\n key={tip.title}\n href={tip.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 transition-colors text-left\"\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n <ExternalLink className=\"size-3 text-text-secondary shrink-0 mt-0.5\" />\n </a>\n ) : (\n <button\n key={tip.title}\n type=\"button\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 cursor-pointer transition-colors text-left\"\n onClick={() => navigate(tip.href)}\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n </button>\n )\n )}\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;AA4BA,IAAM,IAA2B;CAC/B;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACF,EAEK,IAAyB;CAC7B;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACF,EAEK,IAAyB;CAC7B;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACF;AAED,SAAS,EAAS,GAA2B;AAG3C,QAFI,MAAc,iBAAuB,IACrC,MAAc,eAAqB,IAChC;;AAGT,SAAgB,EAAW,EAAE,aAAU,cAAW,gBAA0B;CAC1E,IAAM,IAAO,EAAS,EAAU;AAEhC,QACE,kBAAC,GAAD;EACE,OAAM;EACN,MAAM,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA;EACtC,MAAK;EACM;YAEX,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAK,KAAK,MACT,EAAI,WACF,kBAAC,KAAD;IAEE,MAAM,EAAI;IACV,QAAO;IACP,KAAI;IACJ,WAAU;cALZ;KAOE,kBAAC,EAAI,MAAL,EAAU,WAAW,0BAA0B,EAAI,SAAW,CAAA;KAC9D,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAuD,EAAI;OAAU,CAAA,EAClF,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAI;OACH,CAAA,CACA;;KACN,kBAAC,GAAD,EAAc,WAAU,8CAA+C,CAAA;KACrE;MAdG,EAAI,MAcP,GAEJ,kBAAC,UAAD;IAEE,MAAK;IACL,WAAU;IACV,eAAe,EAAS,EAAI,KAAK;cAJnC,CAME,kBAAC,EAAI,MAAL,EAAU,WAAW,0BAA0B,EAAI,SAAW,CAAA,EAC9D,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,KAAD;MAAG,WAAU;gBAAuD,EAAI;MAAU,CAAA,EAClF,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAI;MACH,CAAA,CACA;OACC;MAZF,EAAI,MAYF,CAEZ;GACG,CAAA;EACQ,CAAA"}
|
|
1
|
+
{"version":3,"file":"TipsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/TipsWidget.tsx"],"sourcesContent":["import type { LucideIcon } from 'lucide-react';\nimport {\n Lightbulb,\n ExternalLink,\n BookOpen,\n Rocket,\n Shield,\n Workflow,\n Users,\n Puzzle,\n Newspaper,\n Sparkles,\n GitBranch,\n LayoutTemplate,\n ScrollText,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\nimport { tWithFallback } from '../../../utils/i18n';\n\ntype Translator = Parameters<typeof tWithFallback>[0];\n\ninterface Tip {\n icon: LucideIcon;\n title: string;\n description: string;\n href: string;\n external?: boolean;\n color: string;\n}\n\nfunction getVibecontrolsTips(t: Translator): Tip[] {\n return [\n {\n icon: BookOpen,\n title: tWithFallback(t, 'dashboard.tips.vibecontrols.readDocs.title', 'Read the docs'),\n description: tWithFallback(\n t,\n 'dashboard.tips.vibecontrols.readDocs.description',\n 'Guides, references, and tutorials at docs.vibecontrols.com.'\n ),\n href: 'https://docs.vibecontrols.com',\n external: true,\n color: 'text-accent-blue',\n },\n {\n icon: Users,\n title: tWithFallback(t, 'dashboard.tips.vibecontrols.community.title', 'Join the community'),\n description: tWithFallback(\n t,\n 'dashboard.tips.vibecontrols.community.description',\n 'Ask questions, share workflows, and chat with the team.'\n ),\n href: 'https://community.vibecontrols.com',\n external: true,\n color: 'text-accent-purple',\n },\n {\n icon: Puzzle,\n title: tWithFallback(t, 'dashboard.tips.vibecontrols.plugins.title', 'Browse plugins'),\n description: tWithFallback(\n t,\n 'dashboard.tips.vibecontrols.plugins.description',\n '50+ plugins for terminals, AI, tunnels, sandboxes, and more.'\n ),\n href: '/vibecontrols/plugins',\n color: 'text-status-success-text',\n },\n {\n icon: Newspaper,\n title: tWithFallback(t, 'dashboard.tips.vibecontrols.blog.title', 'Latest from the blog'),\n description: tWithFallback(\n t,\n 'dashboard.tips.vibecontrols.blog.description',\n 'Product updates, deep dives, and engineering posts.'\n ),\n href: 'https://vibecontrols.com/blog',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Sparkles,\n title: tWithFallback(\n t,\n 'dashboard.tips.vibecontrols.featurePreviews.title',\n 'Feature previews'\n ),\n description: tWithFallback(\n t,\n 'dashboard.tips.vibecontrols.featurePreviews.description',\n 'Try opt-in features before they ship to everyone.'\n ),\n href: '/feature-previews',\n color: 'text-accent-pink',\n },\n ];\n}\n\nfunction getWorkspacesTips(t: Translator): Tip[] {\n return [\n {\n icon: Rocket,\n title: tWithFallback(\n t,\n 'dashboard.tips.workspaces.createWorkspace.title',\n 'Create your first workspace'\n ),\n description: tWithFallback(\n t,\n 'dashboard.tips.workspaces.createWorkspace.description',\n 'Organize your team with a dedicated workspace.'\n ),\n href: '/workspaces/list',\n color: 'text-accent-blue',\n },\n {\n icon: Workflow,\n title: tWithFallback(\n t,\n 'dashboard.tips.workspaces.automateWorkflows.title',\n 'Automate with workflows'\n ),\n description: tWithFallback(\n t,\n 'dashboard.tips.workspaces.automateWorkflows.description',\n 'Build automation workflows to streamline your processes.'\n ),\n href: '/workflows',\n color: 'text-status-success-text',\n },\n {\n icon: Shield,\n title: tWithFallback(t, 'dashboard.tips.workspaces.permissions.title', 'Set up permissions'),\n description: tWithFallback(\n t,\n 'dashboard.tips.workspaces.permissions.description',\n 'Configure role-based access for your workspace members.'\n ),\n href: '/rbac',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: tWithFallback(t, 'dashboard.tips.workspaces.exploreApi.title', 'Explore the API'),\n description: tWithFallback(\n t,\n 'dashboard.tips.workspaces.exploreApi.description',\n 'Check out our developer portal for API documentation.'\n ),\n href: '/devportal',\n color: 'text-status-warning-text',\n },\n ];\n}\n\nfunction getFluidgridsTips(t: Translator): Tip[] {\n return [\n {\n icon: GitBranch,\n title: tWithFallback(\n t,\n 'dashboard.tips.fluidgrids.buildWorkflow.title',\n 'Build your first workflow'\n ),\n description: tWithFallback(\n t,\n 'dashboard.tips.fluidgrids.buildWorkflow.description',\n 'Drag nodes onto the canvas to automate a process end to end.'\n ),\n href: '/workflows/new',\n color: 'text-accent-blue',\n },\n {\n icon: LayoutTemplate,\n title: tWithFallback(t, 'dashboard.tips.fluidgrids.template.title', 'Start from a template'),\n description: tWithFallback(\n t,\n 'dashboard.tips.fluidgrids.template.description',\n 'Skip the blank canvas with a ready-made workflow template.'\n ),\n href: '/workflows/templates',\n color: 'text-status-success-text',\n },\n {\n icon: ScrollText,\n title: tWithFallback(t, 'dashboard.tips.fluidgrids.debugRun.title', 'Debug a failed run'),\n description: tWithFallback(\n t,\n 'dashboard.tips.fluidgrids.debugRun.description',\n 'Inspect node-by-node execution logs for any workflow run.'\n ),\n href: '/workflows/runs',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: tWithFallback(t, 'dashboard.tips.fluidgrids.readDocs.title', 'Read the docs'),\n description: tWithFallback(\n t,\n 'dashboard.tips.fluidgrids.readDocs.description',\n 'Guides and node reference at docs.fluidgrids.com.'\n ),\n href: 'https://docs.fluidgrids.com',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Users,\n title: tWithFallback(t, 'dashboard.tips.fluidgrids.community.title', 'Join the community'),\n description: tWithFallback(\n t,\n 'dashboard.tips.fluidgrids.community.description',\n 'Share workflows and get help from other builders.'\n ),\n href: 'https://community.fluidgrids.com',\n external: true,\n color: 'text-accent-pink',\n },\n ];\n}\n\nfunction pickTips(t: Translator, productId?: string): Tip[] {\n if (productId === 'vibecontrols') return getVibecontrolsTips(t);\n if (productId === 'fluidgrids') return getFluidgridsTips(t);\n return getWorkspacesTips(t);\n}\n\nexport function TipsWidget({ navigate, isLoading, productId }: WidgetProps) {\n const { t } = useI18n();\n const tips = pickTips(t, productId);\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.tips.title', 'Tips & Resources')}\n icon={<Lightbulb className=\"size-4\" />}\n size=\"small\"\n isLoading={isLoading}\n >\n <div className=\"space-y-2\">\n {tips.map((tip) =>\n tip.external ? (\n <a\n key={tip.title}\n href={tip.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 transition-colors text-left\"\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n <ExternalLink className=\"size-3 text-text-secondary shrink-0 mt-0.5\" />\n </a>\n ) : (\n <button\n key={tip.title}\n type=\"button\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 cursor-pointer transition-colors text-left\"\n onClick={() => navigate(tip.href)}\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n </button>\n )\n )}\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;AAgCA,SAAS,EAAoB,GAAsB;AACjD,QAAO;EACL;GACE,MAAM;GACN,OAAO,EAAc,GAAG,8CAA8C,gBAAgB;GACtF,aAAa,EACX,GACA,oDACA,8DACD;GACD,MAAM;GACN,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,+CAA+C,qBAAqB;GAC5F,aAAa,EACX,GACA,qDACA,0DACD;GACD,MAAM;GACN,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,6CAA6C,iBAAiB;GACtF,aAAa,EACX,GACA,mDACA,+DACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,0CAA0C,uBAAuB;GACzF,aAAa,EACX,GACA,gDACA,sDACD;GACD,MAAM;GACN,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EACL,GACA,qDACA,mBACD;GACD,aAAa,EACX,GACA,2DACA,oDACD;GACD,MAAM;GACN,OAAO;GACR;EACF;;AAGH,SAAS,EAAkB,GAAsB;AAC/C,QAAO;EACL;GACE,MAAM;GACN,OAAO,EACL,GACA,mDACA,8BACD;GACD,aAAa,EACX,GACA,yDACA,iDACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EACL,GACA,qDACA,0BACD;GACD,aAAa,EACX,GACA,2DACA,2DACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,+CAA+C,qBAAqB;GAC5F,aAAa,EACX,GACA,qDACA,0DACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,8CAA8C,kBAAkB;GACxF,aAAa,EACX,GACA,oDACA,wDACD;GACD,MAAM;GACN,OAAO;GACR;EACF;;AAGH,SAAS,EAAkB,GAAsB;AAC/C,QAAO;EACL;GACE,MAAM;GACN,OAAO,EACL,GACA,iDACA,4BACD;GACD,aAAa,EACX,GACA,uDACA,+DACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,4CAA4C,wBAAwB;GAC5F,aAAa,EACX,GACA,kDACA,6DACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,4CAA4C,qBAAqB;GACzF,aAAa,EACX,GACA,kDACA,4DACD;GACD,MAAM;GACN,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,4CAA4C,gBAAgB;GACpF,aAAa,EACX,GACA,kDACA,oDACD;GACD,MAAM;GACN,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO,EAAc,GAAG,6CAA6C,qBAAqB;GAC1F,aAAa,EACX,GACA,mDACA,oDACD;GACD,MAAM;GACN,UAAU;GACV,OAAO;GACR;EACF;;AAGH,SAAS,EAAS,GAAe,GAA2B;AAG1D,QAFI,MAAc,iBAAuB,EAAoB,EAAE,GAC3D,MAAc,eAAqB,EAAkB,EAAE,GACpD,EAAkB,EAAE;;AAG7B,SAAgB,EAAW,EAAE,aAAU,cAAW,gBAA0B;CAC1E,IAAM,EAAE,SAAM,GAAS,EACjB,IAAO,EAAS,GAAG,EAAU;AAEnC,QACE,kBAAC,GAAD;EACE,OAAO,EAAc,GAAG,wBAAwB,mBAAmB;EACnE,MAAM,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA;EACtC,MAAK;EACM;YAEX,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAK,KAAK,MACT,EAAI,WACF,kBAAC,KAAD;IAEE,MAAM,EAAI;IACV,QAAO;IACP,KAAI;IACJ,WAAU;cALZ;KAOE,kBAAC,EAAI,MAAL,EAAU,WAAW,0BAA0B,EAAI,SAAW,CAAA;KAC9D,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAuD,EAAI;OAAU,CAAA,EAClF,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAI;OACH,CAAA,CACA;;KACN,kBAAC,GAAD,EAAc,WAAU,8CAA+C,CAAA;KACrE;MAdG,EAAI,MAcP,GAEJ,kBAAC,UAAD;IAEE,MAAK;IACL,WAAU;IACV,eAAe,EAAS,EAAI,KAAK;cAJnC,CAME,kBAAC,EAAI,MAAL,EAAU,WAAW,0BAA0B,EAAI,SAAW,CAAA,EAC9D,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,KAAD;MAAG,WAAU;gBAAuD,EAAI;MAAU,CAAA,EAClF,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAI;MACH,CAAA,CACA;OACC;MAZF,EAAI,MAYF,CAEZ;GACG,CAAA;EACQ,CAAA"}
|
|
@@ -1,82 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { tWithFallback as e } from "../../../utils/i18n.js";
|
|
2
|
+
import { WidgetWrapper as t } from "../WidgetWrapper.js";
|
|
3
|
+
import { ArrowRight as n, Calendar as r, Clock as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { Badge as s, Button as c, IllustratedEmptyState as l } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
7
|
//#region src/pages/dashboard/widgets/UpcomingEventsWidget.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
let
|
|
10
|
-
return
|
|
8
|
+
function d(t, n) {
|
|
9
|
+
let r = new Date(n), i = /* @__PURE__ */ new Date(), a = r.toDateString() === i.toDateString(), o = new Date(i);
|
|
10
|
+
o.setDate(o.getDate() + 1);
|
|
11
|
+
let s = r.toDateString() === o.toDateString();
|
|
12
|
+
return a ? e(t, "dashboard.upcomingEvents.today", "Today at {time}", { time: r.toLocaleTimeString([], {
|
|
11
13
|
hour: "2-digit",
|
|
12
14
|
minute: "2-digit"
|
|
13
|
-
})}
|
|
15
|
+
}) }) : s ? e(t, "dashboard.upcomingEvents.tomorrow", "Tomorrow at {time}", { time: r.toLocaleTimeString([], {
|
|
14
16
|
hour: "2-digit",
|
|
15
17
|
minute: "2-digit"
|
|
16
|
-
})}
|
|
18
|
+
}) }) : r.toLocaleDateString([], {
|
|
17
19
|
month: "short",
|
|
18
20
|
day: "numeric",
|
|
19
21
|
hour: "2-digit",
|
|
20
22
|
minute: "2-digit"
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
title: "Upcoming Events",
|
|
27
|
-
icon: /* @__PURE__ */
|
|
25
|
+
function f({ workspaceData: f, isLoading: p, navigate: m }) {
|
|
26
|
+
let { t: h } = u(), g = f?.upcomingEvents ?? [];
|
|
27
|
+
return /* @__PURE__ */ a(t, {
|
|
28
|
+
title: e(h, "dashboard.upcomingEvents.title", "Upcoming Events"),
|
|
29
|
+
icon: /* @__PURE__ */ a(r, { className: "size-4" }),
|
|
28
30
|
size: "medium",
|
|
29
|
-
isLoading:
|
|
30
|
-
unavailable: !
|
|
31
|
-
headerAction: /* @__PURE__ */
|
|
31
|
+
isLoading: p,
|
|
32
|
+
unavailable: !f,
|
|
33
|
+
headerAction: /* @__PURE__ */ o(c, {
|
|
32
34
|
variant: "ghost",
|
|
33
35
|
size: "sm",
|
|
34
36
|
className: "text-xs",
|
|
35
|
-
onClick: () =>
|
|
36
|
-
children: [
|
|
37
|
+
onClick: () => m("/calendar"),
|
|
38
|
+
children: [
|
|
39
|
+
e(h, "dashboard.upcomingEvents.viewAll", "View all"),
|
|
40
|
+
" ",
|
|
41
|
+
/* @__PURE__ */ a(n, { className: "ml-1 size-3" })
|
|
42
|
+
]
|
|
37
43
|
}),
|
|
38
|
-
children:
|
|
44
|
+
children: g.length === 0 ? /* @__PURE__ */ a(l, {
|
|
39
45
|
illustration: "empty-data",
|
|
40
|
-
title: "No upcoming events",
|
|
46
|
+
title: e(h, "dashboard.upcomingEvents.emptyTitle", "No upcoming events"),
|
|
41
47
|
className: "py-4",
|
|
42
|
-
action: /* @__PURE__ */
|
|
48
|
+
action: /* @__PURE__ */ a(c, {
|
|
43
49
|
variant: "outline",
|
|
44
50
|
size: "sm",
|
|
45
|
-
onClick: () =>
|
|
46
|
-
children: "Schedule an event"
|
|
51
|
+
onClick: () => m("/calendar"),
|
|
52
|
+
children: e(h, "dashboard.upcomingEvents.emptyAction", "Schedule an event")
|
|
47
53
|
})
|
|
48
|
-
}) : /* @__PURE__ */
|
|
54
|
+
}) : /* @__PURE__ */ a("div", {
|
|
49
55
|
className: "space-y-2",
|
|
50
|
-
children:
|
|
56
|
+
children: g.map((t) => /* @__PURE__ */ o("button", {
|
|
51
57
|
type: "button",
|
|
52
58
|
className: "w-full flex items-start gap-3 p-2 rounded-md hover:bg-accent/5 cursor-pointer transition-colors text-left",
|
|
53
|
-
onClick: () =>
|
|
59
|
+
onClick: () => m("/calendar"),
|
|
54
60
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ a("div", {
|
|
56
62
|
className: "rounded-md bg-accent-pink-subtle text-accent-pink p-1.5 shrink-0",
|
|
57
|
-
children: /* @__PURE__ */ i
|
|
63
|
+
children: /* @__PURE__ */ a(i, { className: "size-3.5" })
|
|
58
64
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ o("div", {
|
|
60
66
|
className: "min-w-0 flex-1",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ a("p", {
|
|
62
68
|
className: "text-sm font-medium text-text-primary truncate",
|
|
63
|
-
children:
|
|
64
|
-
}), /* @__PURE__ */
|
|
69
|
+
children: t.title
|
|
70
|
+
}), /* @__PURE__ */ a("p", {
|
|
65
71
|
className: "text-xs text-text-secondary",
|
|
66
|
-
children:
|
|
72
|
+
children: d(h, t.startTime)
|
|
67
73
|
})]
|
|
68
74
|
}),
|
|
69
|
-
|
|
75
|
+
t.allDay && /* @__PURE__ */ a(s, {
|
|
70
76
|
variant: "secondary",
|
|
71
77
|
className: "text-[10px] shrink-0",
|
|
72
|
-
children: "All day"
|
|
78
|
+
children: e(h, "dashboard.upcomingEvents.allDay", "All day")
|
|
73
79
|
})
|
|
74
80
|
]
|
|
75
|
-
},
|
|
81
|
+
}, t.id))
|
|
76
82
|
})
|
|
77
83
|
});
|
|
78
84
|
}
|
|
79
85
|
//#endregion
|
|
80
|
-
export {
|
|
86
|
+
export { f as UpcomingEventsWidget };
|
|
81
87
|
|
|
82
88
|
//# sourceMappingURL=UpcomingEventsWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpcomingEventsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/UpcomingEventsWidget.tsx"],"sourcesContent":["import { Calendar, ArrowRight, Clock } from 'lucide-react';\nimport { Badge, Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\nfunction formatEventDate(dateStr: string): string {\n const d = new Date(dateStr);\n const now = new Date();\n const isToday = d.toDateString() === now.toDateString();\n const tomorrow = new Date(now);\n tomorrow.setDate(tomorrow.getDate() + 1);\n const isTomorrow = d.toDateString() === tomorrow.toDateString();\n\n if (isToday)\n return
|
|
1
|
+
{"version":3,"file":"UpcomingEventsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/UpcomingEventsWidget.tsx"],"sourcesContent":["import { Calendar, ArrowRight, Clock } from 'lucide-react';\nimport { Badge, Button, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport type { I18nContextValue } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport { tWithFallback } from '../../../utils/i18n';\nimport type { WidgetProps } from '../types';\n\nfunction formatEventDate(t: I18nContextValue['t'], dateStr: string): string {\n const d = new Date(dateStr);\n const now = new Date();\n const isToday = d.toDateString() === now.toDateString();\n const tomorrow = new Date(now);\n tomorrow.setDate(tomorrow.getDate() + 1);\n const isTomorrow = d.toDateString() === tomorrow.toDateString();\n\n if (isToday)\n return tWithFallback(t, 'dashboard.upcomingEvents.today', 'Today at {time}', {\n time: d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),\n });\n if (isTomorrow)\n return tWithFallback(t, 'dashboard.upcomingEvents.tomorrow', 'Tomorrow at {time}', {\n time: d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }),\n });\n return d.toLocaleDateString([], {\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function UpcomingEventsWidget({ workspaceData, isLoading, navigate }: WidgetProps) {\n const { t } = useI18n();\n const events = workspaceData?.upcomingEvents ?? [];\n\n return (\n <WidgetWrapper\n title={tWithFallback(t, 'dashboard.upcomingEvents.title', 'Upcoming Events')}\n icon={<Calendar className=\"size-4\" />}\n size=\"medium\"\n isLoading={isLoading}\n unavailable={!workspaceData}\n headerAction={\n <Button variant=\"ghost\" size=\"sm\" className=\"text-xs\" onClick={() => navigate('/calendar')}>\n {tWithFallback(t, 'dashboard.upcomingEvents.viewAll', 'View all')}{' '}\n <ArrowRight className=\"ml-1 size-3\" />\n </Button>\n }\n >\n {events.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tWithFallback(t, 'dashboard.upcomingEvents.emptyTitle', 'No upcoming events')}\n className=\"py-4\"\n action={\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/calendar')}>\n {tWithFallback(t, 'dashboard.upcomingEvents.emptyAction', 'Schedule an event')}\n </Button>\n }\n />\n ) : (\n <div className=\"space-y-2\">\n {events.map((event) => (\n <button\n key={event.id}\n type=\"button\"\n className=\"w-full flex items-start gap-3 p-2 rounded-md hover:bg-accent/5 cursor-pointer transition-colors text-left\"\n onClick={() => navigate('/calendar')}\n >\n <div className=\"rounded-md bg-accent-pink-subtle text-accent-pink p-1.5 shrink-0\">\n <Clock className=\"size-3.5\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{event.title}</p>\n <p className=\"text-xs text-text-secondary\">{formatEventDate(t, event.startTime)}</p>\n </div>\n {event.allDay && (\n <Badge variant=\"secondary\" className=\"text-[10px] shrink-0\">\n {tWithFallback(t, 'dashboard.upcomingEvents.allDay', 'All day')}\n </Badge>\n )}\n </button>\n ))}\n </div>\n )}\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;;;AAQA,SAAS,EAAgB,GAA0B,GAAyB;CAC1E,IAAM,IAAI,IAAI,KAAK,EAAQ,EACrB,oBAAM,IAAI,MAAM,EAChB,IAAU,EAAE,cAAc,KAAK,EAAI,cAAc,EACjD,IAAW,IAAI,KAAK,EAAI;AAC9B,GAAS,QAAQ,EAAS,SAAS,GAAG,EAAE;CACxC,IAAM,IAAa,EAAE,cAAc,KAAK,EAAS,cAAc;AAU/D,QARI,IACK,EAAc,GAAG,kCAAkC,mBAAmB,EAC3E,MAAM,EAAE,mBAAmB,EAAE,EAAE;EAAE,MAAM;EAAW,QAAQ;EAAW,CAAC,EACvE,CAAC,GACA,IACK,EAAc,GAAG,qCAAqC,sBAAsB,EACjF,MAAM,EAAE,mBAAmB,EAAE,EAAE;EAAE,MAAM;EAAW,QAAQ;EAAW,CAAC,EACvE,CAAC,GACG,EAAE,mBAAmB,EAAE,EAAE;EAC9B,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,EAAqB,EAAE,kBAAe,cAAW,eAAyB;CACxF,IAAM,EAAE,SAAM,GAAS,EACjB,IAAS,GAAe,kBAAkB,EAAE;AAElD,QACE,kBAAC,GAAD;EACE,OAAO,EAAc,GAAG,kCAAkC,kBAAkB;EAC5E,MAAM,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA;EACrC,MAAK;EACM;EACX,aAAa,CAAC;EACd,cACE,kBAAC,GAAD;GAAQ,SAAQ;GAAQ,MAAK;GAAK,WAAU;GAAU,eAAe,EAAS,YAAY;aAA1F;IACG,EAAc,GAAG,oCAAoC,WAAW;IAAE;IACnE,kBAAC,GAAD,EAAY,WAAU,eAAgB,CAAA;IAC/B;;YAGV,EAAO,WAAW,IACjB,kBAAC,GAAD;GACE,cAAa;GACb,OAAO,EAAc,GAAG,uCAAuC,qBAAqB;GACpF,WAAU;GACV,QACE,kBAAC,GAAD;IAAQ,SAAQ;IAAU,MAAK;IAAK,eAAe,EAAS,YAAY;cACrE,EAAc,GAAG,wCAAwC,oBAAoB;IACvE,CAAA;GAEX,CAAA,GAEF,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAO,KAAK,MACX,kBAAC,UAAD;IAEE,MAAK;IACL,WAAU;IACV,eAAe,EAAS,YAAY;cAJtC;KAME,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD,EAAO,WAAU,YAAa,CAAA;MAC1B,CAAA;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAkD,EAAM;OAAU,CAAA,EAC/E,kBAAC,KAAD;OAAG,WAAU;iBAA+B,EAAgB,GAAG,EAAM,UAAU;OAAK,CAAA,CAChF;;KACL,EAAM,UACL,kBAAC,GAAD;MAAO,SAAQ;MAAY,WAAU;gBAClC,EAAc,GAAG,mCAAmC,UAAU;MACzD,CAAA;KAEH;MAjBF,EAAM,GAiBJ,CACT;GACE,CAAA;EAEM,CAAA"}
|
|
@@ -1,63 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { tWithFallback as e } from "../../../utils/i18n.js";
|
|
2
|
+
import { WidgetWrapper as t } from "../WidgetWrapper.js";
|
|
3
|
+
import { ArrowRight as n, Plus as r, Sparkles as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { Button as s, IllustratedEmptyState as c } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
7
|
//#region src/pages/dashboard/widgets/VibesWidget.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
if (
|
|
9
|
-
if (
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
13
|
-
return
|
|
8
|
+
function u(t, n) {
|
|
9
|
+
let r = Date.now() - new Date(n).getTime(), i = Math.floor(r / 6e4);
|
|
10
|
+
if (i < 1) return e(t, "dashboard.vibes.justNow", "just now");
|
|
11
|
+
if (i < 60) return e(t, "dashboard.vibes.minutesAgo", "{count}m ago", { count: i });
|
|
12
|
+
let a = Math.floor(i / 60);
|
|
13
|
+
if (a < 24) return e(t, "dashboard.vibes.hoursAgo", "{count}h ago", { count: a });
|
|
14
|
+
let o = Math.floor(a / 24);
|
|
15
|
+
return o < 7 ? e(t, "dashboard.vibes.daysAgo", "{count}d ago", { count: o }) : new Date(n).toLocaleDateString(void 0, {
|
|
14
16
|
month: "short",
|
|
15
17
|
day: "numeric"
|
|
16
18
|
});
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
title: "Recent Vibes",
|
|
22
|
-
icon: /* @__PURE__ */ i
|
|
20
|
+
function d({ workspaceData: d, isLoading: f, navigate: p }) {
|
|
21
|
+
let { t: m } = l(), h = d?.recentVibes ?? [];
|
|
22
|
+
return /* @__PURE__ */ a(t, {
|
|
23
|
+
title: e(m, "dashboard.vibes.title", "Recent Vibes"),
|
|
24
|
+
icon: /* @__PURE__ */ a(i, { className: "size-4" }),
|
|
23
25
|
size: "medium",
|
|
24
|
-
isLoading:
|
|
25
|
-
unavailable: !
|
|
26
|
-
headerAction: /* @__PURE__ */
|
|
26
|
+
isLoading: f,
|
|
27
|
+
unavailable: !d,
|
|
28
|
+
headerAction: /* @__PURE__ */ o(s, {
|
|
27
29
|
variant: "ghost",
|
|
28
30
|
size: "sm",
|
|
29
31
|
className: "text-xs",
|
|
30
|
-
onClick: () =>
|
|
31
|
-
children: [
|
|
32
|
+
onClick: () => p("/vibecontrols/vibes"),
|
|
33
|
+
children: [
|
|
34
|
+
e(m, "dashboard.vibes.viewAll", "View all"),
|
|
35
|
+
" ",
|
|
36
|
+
/* @__PURE__ */ a(n, { className: "ml-1 size-3" })
|
|
37
|
+
]
|
|
32
38
|
}),
|
|
33
|
-
children:
|
|
39
|
+
children: h.length === 0 ? /* @__PURE__ */ a(c, {
|
|
34
40
|
illustration: "empty-vibes",
|
|
35
|
-
title: "No vibes yet",
|
|
41
|
+
title: e(m, "dashboard.vibes.emptyTitle", "No vibes yet"),
|
|
36
42
|
className: "py-4",
|
|
37
|
-
action: /* @__PURE__ */
|
|
43
|
+
action: /* @__PURE__ */ o(s, {
|
|
38
44
|
variant: "outline",
|
|
39
45
|
size: "sm",
|
|
40
|
-
onClick: () =>
|
|
41
|
-
children: [
|
|
46
|
+
onClick: () => p("/vibecontrols/vibes/new"),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ a(r, { className: "mr-1.5 size-3.5" }),
|
|
49
|
+
" ",
|
|
50
|
+
e(m, "dashboard.vibes.emptyAction", "Create your first vibe")
|
|
51
|
+
]
|
|
42
52
|
})
|
|
43
|
-
}) : /* @__PURE__ */
|
|
53
|
+
}) : /* @__PURE__ */ a("ul", {
|
|
44
54
|
className: "space-y-1.5",
|
|
45
|
-
children:
|
|
55
|
+
children: h.slice(0, 5).map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ o("button", {
|
|
46
56
|
type: "button",
|
|
47
|
-
onClick: () =>
|
|
57
|
+
onClick: () => p(`/vibecontrols/vibes/${e.id}`),
|
|
48
58
|
className: "flex w-full items-center justify-between gap-2 rounded-md p-2 text-left transition-colors hover:bg-accent/5",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ a("span", {
|
|
50
60
|
className: "truncate text-sm font-medium text-text-primary",
|
|
51
61
|
children: e.name
|
|
52
|
-
}), /* @__PURE__ */
|
|
62
|
+
}), /* @__PURE__ */ a("span", {
|
|
53
63
|
className: "shrink-0 text-[11px] text-text-secondary",
|
|
54
|
-
children:
|
|
64
|
+
children: u(m, e.updatedAt)
|
|
55
65
|
})]
|
|
56
66
|
}) }, e.id))
|
|
57
67
|
})
|
|
58
68
|
});
|
|
59
69
|
}
|
|
60
70
|
//#endregion
|
|
61
|
-
export {
|
|
71
|
+
export { d as VibesWidget };
|
|
62
72
|
|
|
63
73
|
//# sourceMappingURL=VibesWidget.js.map
|