@qelos/aidev 1.0.0 → 1.0.2
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/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +1 -0
- package/dist/commands/ui.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -1
- package/dist/config.js.map +1 -1
- package/dist/providers/base.d.ts +4 -0
- package/dist/providers/base.d.ts.map +1 -1
- package/dist/providers/clickup.d.ts +3 -0
- package/dist/providers/clickup.d.ts.map +1 -1
- package/dist/providers/clickup.js +33 -3
- package/dist/providers/clickup.js.map +1 -1
- package/dist/providers/jira.d.ts +3 -0
- package/dist/providers/jira.d.ts.map +1 -1
- package/dist/providers/jira.js +39 -0
- package/dist/providers/jira.js.map +1 -1
- package/dist/providers/linear.d.ts +2 -0
- package/dist/providers/linear.d.ts.map +1 -1
- package/dist/providers/linear.js +60 -0
- package/dist/providers/linear.js.map +1 -1
- package/dist/providers/local.d.ts +1 -0
- package/dist/providers/local.d.ts.map +1 -1
- package/dist/providers/local.js +17 -0
- package/dist/providers/local.js.map +1 -1
- package/dist/providers/notion.d.ts +1 -0
- package/dist/providers/notion.d.ts.map +1 -1
- package/dist/providers/notion.js +22 -0
- package/dist/providers/notion.js.map +1 -1
- package/dist/providers/trello.d.ts +2 -0
- package/dist/providers/trello.d.ts.map +1 -1
- package/dist/providers/trello.js +75 -0
- package/dist/providers/trello.js.map +1 -1
- package/package.json +1 -1
- package/ui/.output/nitro.json +1 -1
- package/ui/.output/public/_nuxt/{qxvJYqtu.js → 2bKOvQ0d.js} +1 -1
- package/ui/.output/public/_nuxt/{DQcp3FR_.js → B2vj_HiW.js} +1 -1
- package/ui/.output/public/_nuxt/{LmXiirhS.js → B9AVA2DP.js} +1 -1
- package/ui/.output/public/_nuxt/{v9BBpVmo.js → Bwm-qAEx.js} +1 -1
- package/ui/.output/public/_nuxt/{rG-0aeB1.js → C2BUFUls.js} +1 -1
- package/ui/.output/public/_nuxt/{CbcumZrF.js → C7JnlssT.js} +1 -1
- package/ui/.output/public/_nuxt/C9wM2XOU.js +70 -0
- package/ui/.output/public/_nuxt/{Cybd4n4b.js → CLsTGSNv.js} +1 -1
- package/ui/.output/public/_nuxt/{-JbJIqze.js → CYtbVgsc.js} +1 -1
- package/ui/.output/public/_nuxt/{YG9hQIUX.js → CgEeSDUJ.js} +1 -1
- package/ui/.output/public/_nuxt/{C0MxF24X.js → CjYvNw4D.js} +1 -1
- package/ui/.output/public/_nuxt/{CJImEqMV.js → CnlcD-w9.js} +1 -1
- package/ui/.output/public/_nuxt/{DBH-q-5h.js → Czg20gUb.js} +1 -1
- package/ui/.output/public/_nuxt/{B6CloFTX.js → D7LY3N47.js} +3 -3
- package/ui/.output/public/_nuxt/{Cde_Ulqm.js → DCp3GJQW.js} +1 -1
- package/ui/.output/public/_nuxt/{BQrd1umS.js → DKIXA6Zt.js} +1 -1
- package/ui/.output/public/_nuxt/{BzY5_7kS.js → DL7l9XXk.js} +1 -1
- package/ui/.output/public/_nuxt/{yiI_BGHY.js → DWD1xjy0.js} +1 -1
- package/ui/.output/public/_nuxt/{mH-IieKd.js → DWMhLzME.js} +1 -1
- package/ui/.output/public/_nuxt/{DYTQ_K9y.js → Daca6CiN.js} +1 -1
- package/ui/.output/public/_nuxt/{DoGLy6_9.js → DehGGwZq.js} +1 -1
- package/ui/.output/public/_nuxt/{CB-qGQpu.js → DqW9UKXb.js} +1 -1
- package/ui/.output/public/_nuxt/{BOrBGVUf.js → bW-720fM.js} +1 -1
- package/ui/.output/public/_nuxt/builds/latest.json +1 -1
- package/ui/.output/public/_nuxt/builds/meta/c6a56b63-9280-455c-96ed-843f8029ca3a.json +1 -0
- package/ui/.output/public/_nuxt/{Dd5WWlUa.js → m0N__S0x.js} +1 -1
- package/ui/.output/public/_nuxt/tasks.C3nyxPxf.css +1 -0
- package/ui/.output/server/chunks/build/Button-Dgqz5RR8.mjs +1 -1
- package/ui/.output/server/chunks/build/MarkdownContent-styles.Cmzswe4U.mjs +8 -0
- package/ui/.output/server/chunks/build/MarkdownContent-styles.Cmzswe4U.mjs.map +1 -0
- package/ui/.output/server/chunks/build/TagsBar-styles.Dl9oYtA7.mjs +8 -0
- package/ui/.output/server/chunks/build/TagsBar-styles.Dl9oYtA7.mjs.map +1 -0
- package/ui/.output/server/chunks/build/TaskCreateModal-styles.Ctk3K3aq.mjs +8 -0
- package/ui/.output/server/chunks/build/TaskCreateModal-styles.Ctk3K3aq.mjs.map +1 -0
- package/ui/.output/server/chunks/build/TaskDetailExecute-styles.BOwrZEBG.mjs +8 -0
- package/ui/.output/server/chunks/build/TaskDetailExecute-styles.BOwrZEBG.mjs.map +1 -0
- package/ui/.output/server/chunks/build/TaskDetailModal-styles.BpZ60PFP.mjs +8 -0
- package/ui/.output/server/chunks/build/TaskDetailModal-styles.BpZ60PFP.mjs.map +1 -0
- package/ui/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/ui/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
- package/ui/.output/server/chunks/build/{entry-styles.CnHWhc9b.mjs → entry-styles.D33dgEBj.mjs} +4 -4
- package/ui/.output/server/chunks/build/entry-styles.D33dgEBj.mjs.map +1 -0
- package/ui/.output/server/chunks/build/{interval-CNTT4qkc.mjs → interval-Dye37XM9.mjs} +3 -3
- package/ui/.output/server/chunks/build/{interval-CNTT4qkc.mjs.map → interval-Dye37XM9.mjs.map} +1 -1
- package/ui/.output/server/chunks/build/{logs-CbKQfEiW.mjs → logs-hZKOhIqF.mjs} +3 -3
- package/ui/.output/server/chunks/build/{logs-CbKQfEiW.mjs.map → logs-hZKOhIqF.mjs.map} +1 -1
- package/ui/.output/server/chunks/build/nuxt-link-B3UD8izG.mjs +1 -1
- package/ui/.output/server/chunks/build/server.mjs +3 -3
- package/ui/.output/server/chunks/build/styles.mjs +9 -7
- package/ui/.output/server/chunks/build/styles.mjs.map +1 -1
- package/ui/.output/server/chunks/build/{tasks-CLdWs8cg.mjs → tasks-Bc5VRFpY.mjs} +1011 -331
- package/ui/.output/server/chunks/build/tasks-Bc5VRFpY.mjs.map +1 -0
- package/ui/.output/server/chunks/build/tasks-styles-4.mjs-D037ZDm6.mjs +4 -0
- package/ui/.output/server/chunks/build/tasks-styles-4.mjs-D037ZDm6.mjs.map +1 -0
- package/ui/.output/server/chunks/build/tasks-styles-5.mjs-C-8-0itm.mjs +4 -0
- package/ui/.output/server/chunks/build/tasks-styles-5.mjs-C-8-0itm.mjs.map +1 -0
- package/ui/.output/server/chunks/build/{tasks-styles-4.mjs-eVZp4A8Q.mjs → tasks-styles-6.mjs-eVZp4A8Q.mjs} +1 -1
- package/ui/.output/server/chunks/build/tasks-styles-6.mjs-eVZp4A8Q.mjs.map +1 -0
- package/ui/.output/server/chunks/build/{tasks-styles-5.mjs-DPUNG0PO.mjs → tasks-styles-7.mjs-DPUNG0PO.mjs} +1 -1
- package/ui/.output/server/chunks/build/tasks-styles-7.mjs-DPUNG0PO.mjs.map +1 -0
- package/ui/.output/server/chunks/build/tasks-styles-8.mjs-BWrrF67v.mjs +4 -0
- package/ui/.output/server/chunks/build/tasks-styles-8.mjs-BWrrF67v.mjs.map +1 -0
- package/ui/.output/server/chunks/build/tasks-styles.C7XECkUG.mjs +25 -0
- package/ui/.output/server/chunks/build/tasks-styles.C7XECkUG.mjs.map +1 -0
- package/ui/.output/server/chunks/nitro/nitro.mjs +222 -188
- package/ui/.output/server/chunks/routes/api/config/test.post.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/config.get.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/config.put.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/logs.delete.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/logs.get.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/run.post.mjs +4 -3
- package/ui/.output/server/chunks/routes/api/run.post.mjs.map +1 -1
- package/ui/.output/server/chunks/routes/api/schedule/_id_.delete.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/schedule.post.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/tasks/_id/comment.post.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/tasks/_id/execute.post.mjs +4 -2
- package/ui/.output/server/chunks/routes/api/tasks/_id/execute.post.mjs.map +1 -1
- package/ui/.output/server/chunks/routes/api/tasks/_id/status.post.mjs +1 -1
- package/ui/.output/server/chunks/routes/api/tasks/_id_.patch.mjs +20 -5
- package/ui/.output/server/chunks/routes/api/tasks/_id_.patch.mjs.map +1 -1
- package/ui/.output/server/chunks/routes/api/tasks/statuses.get.mjs +20 -9
- package/ui/.output/server/chunks/routes/api/tasks/statuses.get.mjs.map +1 -1
- package/ui/.output/server/chunks/routes/api/tasks.get.mjs +19 -3
- package/ui/.output/server/chunks/routes/api/tasks.get.mjs.map +1 -1
- package/ui/.output/server/chunks/routes/api/tasks.post.mjs +45 -0
- package/ui/.output/server/chunks/routes/api/tasks.post.mjs.map +1 -0
- package/ui/.output/server/chunks/routes/renderer.mjs +1 -1
- package/ui/.output/server/index.mjs +1 -1
- package/ui/.output/public/_nuxt/D3tjOrt_.js +0 -70
- package/ui/.output/public/_nuxt/builds/meta/d82a45ff-ab57-436a-9e74-0088adfd2cb8.json +0 -1
- package/ui/.output/public/_nuxt/tasks.BoC8zK7P.css +0 -1
- package/ui/.output/server/chunks/build/MarkdownContent-styles.Xj6NTbfU.mjs +0 -8
- package/ui/.output/server/chunks/build/MarkdownContent-styles.Xj6NTbfU.mjs.map +0 -1
- package/ui/.output/server/chunks/build/TaskDetailExecute-styles.T37YBLgC.mjs +0 -8
- package/ui/.output/server/chunks/build/TaskDetailExecute-styles.T37YBLgC.mjs.map +0 -1
- package/ui/.output/server/chunks/build/TaskDetailModal-styles.FkUO4O6f.mjs +0 -8
- package/ui/.output/server/chunks/build/TaskDetailModal-styles.FkUO4O6f.mjs.map +0 -1
- package/ui/.output/server/chunks/build/entry-styles.CnHWhc9b.mjs.map +0 -1
- package/ui/.output/server/chunks/build/tasks-CLdWs8cg.mjs.map +0 -1
- package/ui/.output/server/chunks/build/tasks-styles-4.mjs-eVZp4A8Q.mjs.map +0 -1
- package/ui/.output/server/chunks/build/tasks-styles-5.mjs-DPUNG0PO.mjs.map +0 -1
- package/ui/.output/server/chunks/build/tasks-styles-6.mjs-BeuYvxiU.mjs +0 -4
- package/ui/.output/server/chunks/build/tasks-styles-6.mjs-BeuYvxiU.mjs.map +0 -1
- package/ui/.output/server/chunks/build/tasks-styles.CqRo0zZf.mjs +0 -21
- package/ui/.output/server/chunks/build/tasks-styles.CqRo0zZf.mjs.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { _ as __nuxt_component_0$2 } from './Card-BkfpdQZ7.mjs';
|
|
2
|
-
import { a as __nuxt_component_1 } from './Button-Dgqz5RR8.mjs';
|
|
2
|
+
import { a as __nuxt_component_1, _ as __nuxt_component_0$4 } from './Button-Dgqz5RR8.mjs';
|
|
3
3
|
import { _ as __nuxt_component_2, u as useApi } from './useApi-CFWxoIea.mjs';
|
|
4
4
|
import { _ as __nuxt_component_0$3 } from './nuxt-link-B3UD8izG.mjs';
|
|
5
|
-
import { defineComponent, mergeProps, withCtx, unref, createTextVNode, openBlock, createBlock, createCommentVNode, createVNode, toDisplayString, computed, ref, watch, Fragment, renderList, toRef, nextTick, useSSRContext } from 'vue';
|
|
6
|
-
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList,
|
|
5
|
+
import { defineComponent, mergeProps, withCtx, unref, createTextVNode, openBlock, createBlock, createCommentVNode, createVNode, toDisplayString, computed, ref, watch, reactive, withModifiers, Fragment, renderList, toRef, nextTick, useSSRContext } from 'vue';
|
|
6
|
+
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrRenderSlot, ssrIncludeBooleanAttr } from 'vue/server-renderer';
|
|
7
7
|
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
|
|
8
8
|
import { _ as __nuxt_component_7$1 } from './Modal-KQ_hNOLI.mjs';
|
|
9
|
-
import { marked } from 'marked';
|
|
10
|
-
import DOMPurify from 'isomorphic-dompurify';
|
|
11
|
-
import { _ as __nuxt_component_4$2 } from './Select-ByGZz9s4.mjs';
|
|
12
9
|
import { _ as __nuxt_component_5$1, u as useFormGroup } from './Input-ckU7qZlb.mjs';
|
|
13
10
|
import { twJoin } from 'tailwind-merge';
|
|
14
11
|
import { k as defu } from '../nitro/nitro.mjs';
|
|
15
12
|
import { u as useUI, t as textarea } from './selectMenu-B2FUotwL.mjs';
|
|
16
13
|
import { k as useRuntimeConfig, t as twMerge, a as appConfig, m as mergeConfig, l as looseToNumber } from './server.mjs';
|
|
17
|
-
import {
|
|
14
|
+
import { _ as __nuxt_component_4$2 } from './Select-ByGZz9s4.mjs';
|
|
15
|
+
import { marked } from 'marked';
|
|
16
|
+
import DOMPurify from 'isomorphic-dompurify';
|
|
17
|
+
import { s as setInterval, _ as __nuxt_component_10 } from './interval-Dye37XM9.mjs';
|
|
18
18
|
import './index-Dy4Tu7MB.mjs';
|
|
19
19
|
import '@iconify/vue';
|
|
20
20
|
import '@iconify/utils/lib/css/icon';
|
|
@@ -43,7 +43,7 @@ import 'devalue';
|
|
|
43
43
|
import 'unhead/utils';
|
|
44
44
|
import 'unhead/plugins';
|
|
45
45
|
|
|
46
|
-
const _sfc_main$
|
|
46
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
47
47
|
__name: "TasksTaskCard",
|
|
48
48
|
__ssrInlineRender: true,
|
|
49
49
|
props: {
|
|
@@ -79,14 +79,14 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
const _sfc_setup$
|
|
83
|
-
_sfc_main$
|
|
82
|
+
const _sfc_setup$9 = _sfc_main$9.setup;
|
|
83
|
+
_sfc_main$9.setup = (props, ctx) => {
|
|
84
84
|
const ssrContext = useSSRContext();
|
|
85
85
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TasksTaskCard.vue");
|
|
86
|
-
return _sfc_setup$
|
|
86
|
+
return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
|
|
87
87
|
};
|
|
88
|
-
const __nuxt_component_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
89
|
-
const _sfc_main$
|
|
88
|
+
const __nuxt_component_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-75f8701c"]]);
|
|
89
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
90
90
|
__name: "TasksBoardColumn",
|
|
91
91
|
__ssrInlineRender: true,
|
|
92
92
|
props: {
|
|
@@ -127,14 +127,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
const _sfc_setup$
|
|
131
|
-
_sfc_main$
|
|
130
|
+
const _sfc_setup$8 = _sfc_main$8.setup;
|
|
131
|
+
_sfc_main$8.setup = (props, ctx) => {
|
|
132
132
|
const ssrContext = useSSRContext();
|
|
133
133
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TasksBoardColumn.vue");
|
|
134
|
-
return _sfc_setup$
|
|
134
|
+
return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
|
|
135
135
|
};
|
|
136
|
-
const __nuxt_component_0 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
137
|
-
const _sfc_main$
|
|
136
|
+
const __nuxt_component_0 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-b3a5d2f7"]]);
|
|
137
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
138
138
|
__name: "TasksBoard",
|
|
139
139
|
__ssrInlineRender: true,
|
|
140
140
|
props: {
|
|
@@ -165,54 +165,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
-
const _sfc_setup$
|
|
169
|
-
_sfc_main$
|
|
168
|
+
const _sfc_setup$7 = _sfc_main$7.setup;
|
|
169
|
+
_sfc_main$7.setup = (props, ctx) => {
|
|
170
170
|
const ssrContext = useSSRContext();
|
|
171
171
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TasksBoard.vue");
|
|
172
|
-
return _sfc_setup$
|
|
173
|
-
};
|
|
174
|
-
const __nuxt_component_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3c3c8dd8"]]);
|
|
175
|
-
marked.setOptions({
|
|
176
|
-
gfm: true,
|
|
177
|
-
breaks: true
|
|
178
|
-
});
|
|
179
|
-
const PURIFY_OPTS = {
|
|
180
|
-
USE_PROFILES: { html: true }
|
|
181
|
-
};
|
|
182
|
-
function renderMarkdown(source) {
|
|
183
|
-
const text = source.trim();
|
|
184
|
-
if (!text) return "";
|
|
185
|
-
const raw = marked.parse(text, { async: false });
|
|
186
|
-
return DOMPurify.sanitize(raw, PURIFY_OPTS);
|
|
187
|
-
}
|
|
188
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
189
|
-
__name: "MarkdownContent",
|
|
190
|
-
__ssrInlineRender: true,
|
|
191
|
-
props: {
|
|
192
|
-
content: {}
|
|
193
|
-
},
|
|
194
|
-
setup(__props) {
|
|
195
|
-
const props = __props;
|
|
196
|
-
const html = computed(() => renderMarkdown(props.content));
|
|
197
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
198
|
-
var _a;
|
|
199
|
-
if (unref(html)) {
|
|
200
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "md-content" }, _attrs))} data-v-14f3b300>${(_a = unref(html)) != null ? _a : ""}</div>`);
|
|
201
|
-
} else {
|
|
202
|
-
_push(`<!---->`);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
208
|
-
_sfc_main$4.setup = (props, ctx) => {
|
|
209
|
-
const ssrContext = useSSRContext();
|
|
210
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/MarkdownContent.vue");
|
|
211
|
-
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
172
|
+
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
212
173
|
};
|
|
213
|
-
const __nuxt_component_4 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
174
|
+
const __nuxt_component_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-3c3c8dd8"]]);
|
|
214
175
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.textarea, textarea);
|
|
215
|
-
const _sfc_main$
|
|
176
|
+
const _sfc_main$6 = defineComponent({
|
|
216
177
|
inheritAttrs: false,
|
|
217
178
|
props: {
|
|
218
179
|
modelValue: {
|
|
@@ -419,13 +380,537 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
|
|
|
419
380
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
420
381
|
_push(`</div>`);
|
|
421
382
|
}
|
|
383
|
+
const _sfc_setup$6 = _sfc_main$6.setup;
|
|
384
|
+
_sfc_main$6.setup = (props, ctx) => {
|
|
385
|
+
const ssrContext = useSSRContext();
|
|
386
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/forms/Textarea.vue");
|
|
387
|
+
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
388
|
+
};
|
|
389
|
+
const __nuxt_component_9 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender]]);
|
|
390
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
391
|
+
__name: "TagsBar",
|
|
392
|
+
__ssrInlineRender: true,
|
|
393
|
+
props: {
|
|
394
|
+
modelValue: {},
|
|
395
|
+
suggestedTags: {},
|
|
396
|
+
otherTags: {},
|
|
397
|
+
saving: { type: Boolean }
|
|
398
|
+
},
|
|
399
|
+
emits: ["update:modelValue", "removeOther"],
|
|
400
|
+
setup(__props, { emit: __emit }) {
|
|
401
|
+
const props = __props;
|
|
402
|
+
const MUTEX_GROUPS = [
|
|
403
|
+
/* @__PURE__ */ new Set(["code", "non-code"]),
|
|
404
|
+
/* @__PURE__ */ new Set(["planning", "thinking"])
|
|
405
|
+
];
|
|
406
|
+
function mutexGroup(label) {
|
|
407
|
+
return MUTEX_GROUPS.find((g) => g.has(label));
|
|
408
|
+
}
|
|
409
|
+
const mutexGroups = computed(() => {
|
|
410
|
+
const result = [];
|
|
411
|
+
const placed = /* @__PURE__ */ new Set();
|
|
412
|
+
for (const s of props.suggestedTags) {
|
|
413
|
+
if (placed.has(s.label)) continue;
|
|
414
|
+
const group = MUTEX_GROUPS.find((g) => g.has(s.label));
|
|
415
|
+
if (group) {
|
|
416
|
+
const members = props.suggestedTags.filter((t) => group.has(t.label));
|
|
417
|
+
members.forEach((m) => placed.add(m.label));
|
|
418
|
+
result.push(members);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
return result;
|
|
422
|
+
});
|
|
423
|
+
const singletonList = computed(
|
|
424
|
+
() => props.suggestedTags.filter((s) => !mutexGroup(s.label))
|
|
425
|
+
);
|
|
426
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
427
|
+
var _a;
|
|
428
|
+
const _component_UIcon = __nuxt_component_0$4;
|
|
429
|
+
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
430
|
+
class: ["tags-bar", { "tags-bar--saving": __props.saving }]
|
|
431
|
+
}, _attrs))} data-v-3f5621e5><!--[-->`);
|
|
432
|
+
ssrRenderList(unref(mutexGroups), (group, gi) => {
|
|
433
|
+
_push(`<div class="btn-group" data-v-3f5621e5><!--[-->`);
|
|
434
|
+
ssrRenderList(group, (st) => {
|
|
435
|
+
_push(`<button type="button" class="${ssrRenderClass([{ "btn-seg--on": __props.modelValue.includes(st.tag) }, "btn-seg"])}"${ssrIncludeBooleanAttr(__props.saving) ? " disabled" : ""} data-v-3f5621e5>${ssrInterpolate(st.label)}</button>`);
|
|
436
|
+
});
|
|
437
|
+
_push(`<!--]--></div>`);
|
|
438
|
+
});
|
|
439
|
+
_push(`<!--]--><!--[-->`);
|
|
440
|
+
ssrRenderList(unref(singletonList), (st) => {
|
|
441
|
+
_push(`<button type="button" class="${ssrRenderClass([{ "tag-chip--on": __props.modelValue.includes(st.tag) }, "tag-chip"])}"${ssrIncludeBooleanAttr(__props.saving) ? " disabled" : ""} data-v-3f5621e5>${ssrInterpolate(st.label)}</button>`);
|
|
442
|
+
});
|
|
443
|
+
_push(`<!--]-->`);
|
|
444
|
+
if (__props.otherTags && __props.otherTags.length > 0) {
|
|
445
|
+
_push(`<!--[-->`);
|
|
446
|
+
ssrRenderList(__props.otherTags, (tag) => {
|
|
447
|
+
_push(`<span class="tag-chip tag-chip--on tag-chip--other" data-v-3f5621e5>${ssrInterpolate(tag)} <button type="button" class="tag-chip-remove"${ssrIncludeBooleanAttr(__props.saving) ? " disabled" : ""}${ssrRenderAttr("aria-label", `Remove tag ${tag}`)} data-v-3f5621e5>`);
|
|
448
|
+
_push(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-x-mark" }, null, _parent));
|
|
449
|
+
_push(`</button></span>`);
|
|
450
|
+
});
|
|
451
|
+
_push(`<!--]-->`);
|
|
452
|
+
} else {
|
|
453
|
+
_push(`<!---->`);
|
|
454
|
+
}
|
|
455
|
+
if (__props.suggestedTags.length === 0 && !((_a = __props.otherTags) == null ? void 0 : _a.length)) {
|
|
456
|
+
_push(`<span class="muted-empty" data-v-3f5621e5> No tags. </span>`);
|
|
457
|
+
} else {
|
|
458
|
+
_push(`<!---->`);
|
|
459
|
+
}
|
|
460
|
+
_push(`</div>`);
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
const _sfc_setup$5 = _sfc_main$5.setup;
|
|
465
|
+
_sfc_main$5.setup = (props, ctx) => {
|
|
466
|
+
const ssrContext = useSSRContext();
|
|
467
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TagsBar.vue");
|
|
468
|
+
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
469
|
+
};
|
|
470
|
+
const __nuxt_component_7 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3f5621e5"]]);
|
|
471
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
472
|
+
__name: "TaskCreateModal",
|
|
473
|
+
__ssrInlineRender: true,
|
|
474
|
+
props: {
|
|
475
|
+
open: { type: Boolean },
|
|
476
|
+
saving: { type: Boolean },
|
|
477
|
+
error: {},
|
|
478
|
+
suggestedTags: {}
|
|
479
|
+
},
|
|
480
|
+
emits: ["update:open", "close", "submit"],
|
|
481
|
+
setup(__props, { emit: __emit }) {
|
|
482
|
+
const props = __props;
|
|
483
|
+
const emit = __emit;
|
|
484
|
+
const priorityOptions = [
|
|
485
|
+
{ label: "\u2014 none \u2014", value: "" },
|
|
486
|
+
{ label: "Urgent", value: "1" },
|
|
487
|
+
{ label: "High", value: "2" },
|
|
488
|
+
{ label: "Medium", value: "3" },
|
|
489
|
+
{ label: "Low", value: "4" }
|
|
490
|
+
];
|
|
491
|
+
const defaultCodeTag = computed(() => {
|
|
492
|
+
var _a;
|
|
493
|
+
const code = props.suggestedTags.find((t) => t.label === "code");
|
|
494
|
+
return (_a = code == null ? void 0 : code.tag) != null ? _a : "";
|
|
495
|
+
});
|
|
496
|
+
const form = reactive({
|
|
497
|
+
title: "",
|
|
498
|
+
description: "",
|
|
499
|
+
tags: [],
|
|
500
|
+
priority: ""
|
|
501
|
+
});
|
|
502
|
+
watch(
|
|
503
|
+
() => props.open,
|
|
504
|
+
(open) => {
|
|
505
|
+
if (open) {
|
|
506
|
+
form.title = "";
|
|
507
|
+
form.description = "";
|
|
508
|
+
form.tags = defaultCodeTag.value ? [defaultCodeTag.value] : [];
|
|
509
|
+
form.priority = "";
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
);
|
|
513
|
+
function submit() {
|
|
514
|
+
if (!form.title.trim()) return;
|
|
515
|
+
const priority = form.priority ? parseInt(form.priority, 10) : void 0;
|
|
516
|
+
emit("submit", {
|
|
517
|
+
title: form.title.trim(),
|
|
518
|
+
description: form.description.trim(),
|
|
519
|
+
tags: [...form.tags],
|
|
520
|
+
priority
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
524
|
+
const _component_UModal = __nuxt_component_7$1;
|
|
525
|
+
const _component_UCard = __nuxt_component_0$2;
|
|
526
|
+
const _component_UButton = __nuxt_component_1;
|
|
527
|
+
const _component_UAlert = __nuxt_component_2;
|
|
528
|
+
const _component_UInput = __nuxt_component_5$1;
|
|
529
|
+
const _component_UTextarea = __nuxt_component_9;
|
|
530
|
+
const _component_TasksTagsBar = __nuxt_component_7;
|
|
531
|
+
const _component_USelect = __nuxt_component_4$2;
|
|
532
|
+
_push(ssrRenderComponent(_component_UModal, mergeProps({
|
|
533
|
+
"model-value": __props.open,
|
|
534
|
+
ui: { width: "sm:max-w-xl" },
|
|
535
|
+
"onUpdate:modelValue": ($event) => emit("update:open", $event)
|
|
536
|
+
}, _attrs), {
|
|
537
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
538
|
+
if (_push2) {
|
|
539
|
+
_push2(ssrRenderComponent(_component_UCard, null, {
|
|
540
|
+
header: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
541
|
+
if (_push3) {
|
|
542
|
+
_push3(`<div class="flex items-center justify-between gap-3" data-v-2ed4cf80${_scopeId2}><h2 class="text-base font-semibold" data-v-2ed4cf80${_scopeId2}>New Task</h2>`);
|
|
543
|
+
_push3(ssrRenderComponent(_component_UButton, {
|
|
544
|
+
size: "xs",
|
|
545
|
+
color: "gray",
|
|
546
|
+
variant: "ghost",
|
|
547
|
+
onClick: ($event) => emit("close")
|
|
548
|
+
}, {
|
|
549
|
+
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
550
|
+
if (_push4) {
|
|
551
|
+
_push4(`Close`);
|
|
552
|
+
} else {
|
|
553
|
+
return [
|
|
554
|
+
createTextVNode("Close")
|
|
555
|
+
];
|
|
556
|
+
}
|
|
557
|
+
}),
|
|
558
|
+
_: 1
|
|
559
|
+
}, _parent3, _scopeId2));
|
|
560
|
+
_push3(`</div>`);
|
|
561
|
+
} else {
|
|
562
|
+
return [
|
|
563
|
+
createVNode("div", { class: "flex items-center justify-between gap-3" }, [
|
|
564
|
+
createVNode("h2", { class: "text-base font-semibold" }, "New Task"),
|
|
565
|
+
createVNode(_component_UButton, {
|
|
566
|
+
size: "xs",
|
|
567
|
+
color: "gray",
|
|
568
|
+
variant: "ghost",
|
|
569
|
+
onClick: ($event) => emit("close")
|
|
570
|
+
}, {
|
|
571
|
+
default: withCtx(() => [
|
|
572
|
+
createTextVNode("Close")
|
|
573
|
+
]),
|
|
574
|
+
_: 1
|
|
575
|
+
}, 8, ["onClick"])
|
|
576
|
+
])
|
|
577
|
+
];
|
|
578
|
+
}
|
|
579
|
+
}),
|
|
580
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
581
|
+
if (_push3) {
|
|
582
|
+
if (__props.error) {
|
|
583
|
+
_push3(ssrRenderComponent(_component_UAlert, {
|
|
584
|
+
color: "red",
|
|
585
|
+
variant: "soft",
|
|
586
|
+
title: __props.error,
|
|
587
|
+
class: "mb-4"
|
|
588
|
+
}, null, _parent3, _scopeId2));
|
|
589
|
+
} else {
|
|
590
|
+
_push3(`<!---->`);
|
|
591
|
+
}
|
|
592
|
+
_push3(`<form class="create-form" data-v-2ed4cf80${_scopeId2}><div class="field" data-v-2ed4cf80${_scopeId2}><label class="field-label" data-v-2ed4cf80${_scopeId2}>Title <span class="required" data-v-2ed4cf80${_scopeId2}>*</span></label>`);
|
|
593
|
+
_push3(ssrRenderComponent(_component_UInput, {
|
|
594
|
+
modelValue: unref(form).title,
|
|
595
|
+
"onUpdate:modelValue": ($event) => unref(form).title = $event,
|
|
596
|
+
placeholder: "Task title",
|
|
597
|
+
autofocus: "",
|
|
598
|
+
disabled: __props.saving
|
|
599
|
+
}, null, _parent3, _scopeId2));
|
|
600
|
+
_push3(`</div><div class="field" data-v-2ed4cf80${_scopeId2}><label class="field-label" data-v-2ed4cf80${_scopeId2}>Description</label>`);
|
|
601
|
+
_push3(ssrRenderComponent(_component_UTextarea, {
|
|
602
|
+
modelValue: unref(form).description,
|
|
603
|
+
"onUpdate:modelValue": ($event) => unref(form).description = $event,
|
|
604
|
+
placeholder: "Optional description\u2026",
|
|
605
|
+
rows: 4,
|
|
606
|
+
disabled: __props.saving
|
|
607
|
+
}, null, _parent3, _scopeId2));
|
|
608
|
+
_push3(`</div>`);
|
|
609
|
+
if (__props.suggestedTags.length > 0) {
|
|
610
|
+
_push3(`<div class="field" data-v-2ed4cf80${_scopeId2}><label class="field-label" data-v-2ed4cf80${_scopeId2}>Tags</label>`);
|
|
611
|
+
_push3(ssrRenderComponent(_component_TasksTagsBar, {
|
|
612
|
+
modelValue: unref(form).tags,
|
|
613
|
+
"onUpdate:modelValue": ($event) => unref(form).tags = $event,
|
|
614
|
+
"suggested-tags": __props.suggestedTags,
|
|
615
|
+
saving: __props.saving
|
|
616
|
+
}, null, _parent3, _scopeId2));
|
|
617
|
+
_push3(`</div>`);
|
|
618
|
+
} else {
|
|
619
|
+
_push3(`<!---->`);
|
|
620
|
+
}
|
|
621
|
+
_push3(`<div class="field" data-v-2ed4cf80${_scopeId2}><label class="field-label" data-v-2ed4cf80${_scopeId2}>Priority</label>`);
|
|
622
|
+
_push3(ssrRenderComponent(_component_USelect, {
|
|
623
|
+
modelValue: unref(form).priority,
|
|
624
|
+
"onUpdate:modelValue": ($event) => unref(form).priority = $event,
|
|
625
|
+
options: priorityOptions,
|
|
626
|
+
"value-attribute": "value",
|
|
627
|
+
"option-attribute": "label",
|
|
628
|
+
disabled: __props.saving
|
|
629
|
+
}, null, _parent3, _scopeId2));
|
|
630
|
+
_push3(`</div><div class="actions" data-v-2ed4cf80${_scopeId2}>`);
|
|
631
|
+
_push3(ssrRenderComponent(_component_UButton, {
|
|
632
|
+
color: "gray",
|
|
633
|
+
variant: "ghost",
|
|
634
|
+
disabled: __props.saving,
|
|
635
|
+
onClick: ($event) => emit("close")
|
|
636
|
+
}, {
|
|
637
|
+
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
638
|
+
if (_push4) {
|
|
639
|
+
_push4(` Cancel `);
|
|
640
|
+
} else {
|
|
641
|
+
return [
|
|
642
|
+
createTextVNode(" Cancel ")
|
|
643
|
+
];
|
|
644
|
+
}
|
|
645
|
+
}),
|
|
646
|
+
_: 1
|
|
647
|
+
}, _parent3, _scopeId2));
|
|
648
|
+
_push3(ssrRenderComponent(_component_UButton, {
|
|
649
|
+
type: "submit",
|
|
650
|
+
color: "primary",
|
|
651
|
+
loading: __props.saving,
|
|
652
|
+
disabled: !unref(form).title.trim() || __props.saving
|
|
653
|
+
}, {
|
|
654
|
+
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
655
|
+
if (_push4) {
|
|
656
|
+
_push4(` Create Task `);
|
|
657
|
+
} else {
|
|
658
|
+
return [
|
|
659
|
+
createTextVNode(" Create Task ")
|
|
660
|
+
];
|
|
661
|
+
}
|
|
662
|
+
}),
|
|
663
|
+
_: 1
|
|
664
|
+
}, _parent3, _scopeId2));
|
|
665
|
+
_push3(`</div></form>`);
|
|
666
|
+
} else {
|
|
667
|
+
return [
|
|
668
|
+
__props.error ? (openBlock(), createBlock(_component_UAlert, {
|
|
669
|
+
key: 0,
|
|
670
|
+
color: "red",
|
|
671
|
+
variant: "soft",
|
|
672
|
+
title: __props.error,
|
|
673
|
+
class: "mb-4"
|
|
674
|
+
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
675
|
+
createVNode("form", {
|
|
676
|
+
class: "create-form",
|
|
677
|
+
onSubmit: withModifiers(submit, ["prevent"])
|
|
678
|
+
}, [
|
|
679
|
+
createVNode("div", { class: "field" }, [
|
|
680
|
+
createVNode("label", { class: "field-label" }, [
|
|
681
|
+
createTextVNode("Title "),
|
|
682
|
+
createVNode("span", { class: "required" }, "*")
|
|
683
|
+
]),
|
|
684
|
+
createVNode(_component_UInput, {
|
|
685
|
+
modelValue: unref(form).title,
|
|
686
|
+
"onUpdate:modelValue": ($event) => unref(form).title = $event,
|
|
687
|
+
placeholder: "Task title",
|
|
688
|
+
autofocus: "",
|
|
689
|
+
disabled: __props.saving
|
|
690
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
691
|
+
]),
|
|
692
|
+
createVNode("div", { class: "field" }, [
|
|
693
|
+
createVNode("label", { class: "field-label" }, "Description"),
|
|
694
|
+
createVNode(_component_UTextarea, {
|
|
695
|
+
modelValue: unref(form).description,
|
|
696
|
+
"onUpdate:modelValue": ($event) => unref(form).description = $event,
|
|
697
|
+
placeholder: "Optional description\u2026",
|
|
698
|
+
rows: 4,
|
|
699
|
+
disabled: __props.saving
|
|
700
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
701
|
+
]),
|
|
702
|
+
__props.suggestedTags.length > 0 ? (openBlock(), createBlock("div", {
|
|
703
|
+
key: 0,
|
|
704
|
+
class: "field"
|
|
705
|
+
}, [
|
|
706
|
+
createVNode("label", { class: "field-label" }, "Tags"),
|
|
707
|
+
createVNode(_component_TasksTagsBar, {
|
|
708
|
+
modelValue: unref(form).tags,
|
|
709
|
+
"onUpdate:modelValue": ($event) => unref(form).tags = $event,
|
|
710
|
+
"suggested-tags": __props.suggestedTags,
|
|
711
|
+
saving: __props.saving
|
|
712
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "suggested-tags", "saving"])
|
|
713
|
+
])) : createCommentVNode("", true),
|
|
714
|
+
createVNode("div", { class: "field" }, [
|
|
715
|
+
createVNode("label", { class: "field-label" }, "Priority"),
|
|
716
|
+
createVNode(_component_USelect, {
|
|
717
|
+
modelValue: unref(form).priority,
|
|
718
|
+
"onUpdate:modelValue": ($event) => unref(form).priority = $event,
|
|
719
|
+
options: priorityOptions,
|
|
720
|
+
"value-attribute": "value",
|
|
721
|
+
"option-attribute": "label",
|
|
722
|
+
disabled: __props.saving
|
|
723
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
724
|
+
]),
|
|
725
|
+
createVNode("div", { class: "actions" }, [
|
|
726
|
+
createVNode(_component_UButton, {
|
|
727
|
+
color: "gray",
|
|
728
|
+
variant: "ghost",
|
|
729
|
+
disabled: __props.saving,
|
|
730
|
+
onClick: ($event) => emit("close")
|
|
731
|
+
}, {
|
|
732
|
+
default: withCtx(() => [
|
|
733
|
+
createTextVNode(" Cancel ")
|
|
734
|
+
]),
|
|
735
|
+
_: 1
|
|
736
|
+
}, 8, ["disabled", "onClick"]),
|
|
737
|
+
createVNode(_component_UButton, {
|
|
738
|
+
type: "submit",
|
|
739
|
+
color: "primary",
|
|
740
|
+
loading: __props.saving,
|
|
741
|
+
disabled: !unref(form).title.trim() || __props.saving
|
|
742
|
+
}, {
|
|
743
|
+
default: withCtx(() => [
|
|
744
|
+
createTextVNode(" Create Task ")
|
|
745
|
+
]),
|
|
746
|
+
_: 1
|
|
747
|
+
}, 8, ["loading", "disabled"])
|
|
748
|
+
])
|
|
749
|
+
], 32)
|
|
750
|
+
];
|
|
751
|
+
}
|
|
752
|
+
}),
|
|
753
|
+
_: 1
|
|
754
|
+
}, _parent2, _scopeId));
|
|
755
|
+
} else {
|
|
756
|
+
return [
|
|
757
|
+
createVNode(_component_UCard, null, {
|
|
758
|
+
header: withCtx(() => [
|
|
759
|
+
createVNode("div", { class: "flex items-center justify-between gap-3" }, [
|
|
760
|
+
createVNode("h2", { class: "text-base font-semibold" }, "New Task"),
|
|
761
|
+
createVNode(_component_UButton, {
|
|
762
|
+
size: "xs",
|
|
763
|
+
color: "gray",
|
|
764
|
+
variant: "ghost",
|
|
765
|
+
onClick: ($event) => emit("close")
|
|
766
|
+
}, {
|
|
767
|
+
default: withCtx(() => [
|
|
768
|
+
createTextVNode("Close")
|
|
769
|
+
]),
|
|
770
|
+
_: 1
|
|
771
|
+
}, 8, ["onClick"])
|
|
772
|
+
])
|
|
773
|
+
]),
|
|
774
|
+
default: withCtx(() => [
|
|
775
|
+
__props.error ? (openBlock(), createBlock(_component_UAlert, {
|
|
776
|
+
key: 0,
|
|
777
|
+
color: "red",
|
|
778
|
+
variant: "soft",
|
|
779
|
+
title: __props.error,
|
|
780
|
+
class: "mb-4"
|
|
781
|
+
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
782
|
+
createVNode("form", {
|
|
783
|
+
class: "create-form",
|
|
784
|
+
onSubmit: withModifiers(submit, ["prevent"])
|
|
785
|
+
}, [
|
|
786
|
+
createVNode("div", { class: "field" }, [
|
|
787
|
+
createVNode("label", { class: "field-label" }, [
|
|
788
|
+
createTextVNode("Title "),
|
|
789
|
+
createVNode("span", { class: "required" }, "*")
|
|
790
|
+
]),
|
|
791
|
+
createVNode(_component_UInput, {
|
|
792
|
+
modelValue: unref(form).title,
|
|
793
|
+
"onUpdate:modelValue": ($event) => unref(form).title = $event,
|
|
794
|
+
placeholder: "Task title",
|
|
795
|
+
autofocus: "",
|
|
796
|
+
disabled: __props.saving
|
|
797
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
798
|
+
]),
|
|
799
|
+
createVNode("div", { class: "field" }, [
|
|
800
|
+
createVNode("label", { class: "field-label" }, "Description"),
|
|
801
|
+
createVNode(_component_UTextarea, {
|
|
802
|
+
modelValue: unref(form).description,
|
|
803
|
+
"onUpdate:modelValue": ($event) => unref(form).description = $event,
|
|
804
|
+
placeholder: "Optional description\u2026",
|
|
805
|
+
rows: 4,
|
|
806
|
+
disabled: __props.saving
|
|
807
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
808
|
+
]),
|
|
809
|
+
__props.suggestedTags.length > 0 ? (openBlock(), createBlock("div", {
|
|
810
|
+
key: 0,
|
|
811
|
+
class: "field"
|
|
812
|
+
}, [
|
|
813
|
+
createVNode("label", { class: "field-label" }, "Tags"),
|
|
814
|
+
createVNode(_component_TasksTagsBar, {
|
|
815
|
+
modelValue: unref(form).tags,
|
|
816
|
+
"onUpdate:modelValue": ($event) => unref(form).tags = $event,
|
|
817
|
+
"suggested-tags": __props.suggestedTags,
|
|
818
|
+
saving: __props.saving
|
|
819
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "suggested-tags", "saving"])
|
|
820
|
+
])) : createCommentVNode("", true),
|
|
821
|
+
createVNode("div", { class: "field" }, [
|
|
822
|
+
createVNode("label", { class: "field-label" }, "Priority"),
|
|
823
|
+
createVNode(_component_USelect, {
|
|
824
|
+
modelValue: unref(form).priority,
|
|
825
|
+
"onUpdate:modelValue": ($event) => unref(form).priority = $event,
|
|
826
|
+
options: priorityOptions,
|
|
827
|
+
"value-attribute": "value",
|
|
828
|
+
"option-attribute": "label",
|
|
829
|
+
disabled: __props.saving
|
|
830
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
831
|
+
]),
|
|
832
|
+
createVNode("div", { class: "actions" }, [
|
|
833
|
+
createVNode(_component_UButton, {
|
|
834
|
+
color: "gray",
|
|
835
|
+
variant: "ghost",
|
|
836
|
+
disabled: __props.saving,
|
|
837
|
+
onClick: ($event) => emit("close")
|
|
838
|
+
}, {
|
|
839
|
+
default: withCtx(() => [
|
|
840
|
+
createTextVNode(" Cancel ")
|
|
841
|
+
]),
|
|
842
|
+
_: 1
|
|
843
|
+
}, 8, ["disabled", "onClick"]),
|
|
844
|
+
createVNode(_component_UButton, {
|
|
845
|
+
type: "submit",
|
|
846
|
+
color: "primary",
|
|
847
|
+
loading: __props.saving,
|
|
848
|
+
disabled: !unref(form).title.trim() || __props.saving
|
|
849
|
+
}, {
|
|
850
|
+
default: withCtx(() => [
|
|
851
|
+
createTextVNode(" Create Task ")
|
|
852
|
+
]),
|
|
853
|
+
_: 1
|
|
854
|
+
}, 8, ["loading", "disabled"])
|
|
855
|
+
])
|
|
856
|
+
], 32)
|
|
857
|
+
]),
|
|
858
|
+
_: 1
|
|
859
|
+
})
|
|
860
|
+
];
|
|
861
|
+
}
|
|
862
|
+
}),
|
|
863
|
+
_: 1
|
|
864
|
+
}, _parent));
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
869
|
+
_sfc_main$4.setup = (props, ctx) => {
|
|
870
|
+
const ssrContext = useSSRContext();
|
|
871
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TaskCreateModal.vue");
|
|
872
|
+
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
873
|
+
};
|
|
874
|
+
const __nuxt_component_5 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2ed4cf80"]]);
|
|
875
|
+
marked.setOptions({
|
|
876
|
+
gfm: true,
|
|
877
|
+
breaks: true
|
|
878
|
+
});
|
|
879
|
+
const PURIFY_OPTS = {
|
|
880
|
+
USE_PROFILES: { html: true }
|
|
881
|
+
};
|
|
882
|
+
function renderMarkdown(source) {
|
|
883
|
+
const text = source.trim();
|
|
884
|
+
if (!text) return "";
|
|
885
|
+
const raw = marked.parse(text, { async: false });
|
|
886
|
+
return DOMPurify.sanitize(raw, PURIFY_OPTS);
|
|
887
|
+
}
|
|
888
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
889
|
+
__name: "MarkdownContent",
|
|
890
|
+
__ssrInlineRender: true,
|
|
891
|
+
props: {
|
|
892
|
+
content: {}
|
|
893
|
+
},
|
|
894
|
+
setup(__props) {
|
|
895
|
+
const props = __props;
|
|
896
|
+
const html = computed(() => renderMarkdown(props.content));
|
|
897
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
898
|
+
var _a;
|
|
899
|
+
if (unref(html)) {
|
|
900
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "md-content" }, _attrs))} data-v-14f3b300>${(_a = unref(html)) != null ? _a : ""}</div>`);
|
|
901
|
+
} else {
|
|
902
|
+
_push(`<!---->`);
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
});
|
|
422
907
|
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
423
908
|
_sfc_main$3.setup = (props, ctx) => {
|
|
424
909
|
const ssrContext = useSSRContext();
|
|
425
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("
|
|
910
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/MarkdownContent.vue");
|
|
426
911
|
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
427
912
|
};
|
|
428
|
-
const
|
|
913
|
+
const __nuxt_component_4 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-14f3b300"]]);
|
|
429
914
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
430
915
|
__name: "TaskDetailExecute",
|
|
431
916
|
__ssrInlineRender: true,
|
|
@@ -529,7 +1014,7 @@ _sfc_main$2.setup = (props, ctx) => {
|
|
|
529
1014
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TaskDetailExecute.vue");
|
|
530
1015
|
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
531
1016
|
};
|
|
532
|
-
const
|
|
1017
|
+
const __nuxt_component_8 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a2f9ad74"]]);
|
|
533
1018
|
const DEFAULT_TASK_FILTERS = {
|
|
534
1019
|
open: ["open"],
|
|
535
1020
|
pending: ["pending"],
|
|
@@ -614,10 +1099,27 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
614
1099
|
cwd: {},
|
|
615
1100
|
execRunning: { type: Boolean },
|
|
616
1101
|
execLines: {},
|
|
617
|
-
execText: {}
|
|
1102
|
+
execText: {},
|
|
1103
|
+
suggestedTags: {},
|
|
1104
|
+
tagSaving: { type: Boolean }
|
|
618
1105
|
},
|
|
619
|
-
emits: ["update:open", "close", "update:statusDraft", "changeStatus", "update:commentDraft", "update:commentAsAidev", "postComment", "run", "stop", "clearExec"],
|
|
1106
|
+
emits: ["update:open", "close", "update:statusDraft", "changeStatus", "update:commentDraft", "update:commentAsAidev", "postComment", "run", "stop", "clearExec", "saveTags"],
|
|
620
1107
|
setup(__props, { emit: __emit }) {
|
|
1108
|
+
const props = __props;
|
|
1109
|
+
const otherTags = computed(() => {
|
|
1110
|
+
if (!props.detail) return [];
|
|
1111
|
+
const suggested = new Set(props.suggestedTags.map((s) => s.tag));
|
|
1112
|
+
return props.detail.task.tags.filter((tag) => !suggested.has(tag));
|
|
1113
|
+
});
|
|
1114
|
+
function onTagsChanged(next) {
|
|
1115
|
+
if (!props.detail) return;
|
|
1116
|
+
const prev = props.detail.task.tags;
|
|
1117
|
+
const prevSet = new Set(prev);
|
|
1118
|
+
const nextSet = new Set(next);
|
|
1119
|
+
const add = next.filter((t) => !prevSet.has(t));
|
|
1120
|
+
const remove = prev.filter((t) => !nextSet.has(t));
|
|
1121
|
+
if (add.length || remove.length) emit("saveTags", add, remove);
|
|
1122
|
+
}
|
|
621
1123
|
const emit = __emit;
|
|
622
1124
|
return (_ctx, _push, _parent, _attrs) => {
|
|
623
1125
|
const _component_UModal = __nuxt_component_7$1;
|
|
@@ -627,12 +1129,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
627
1129
|
const _component_MarkdownContent = __nuxt_component_4;
|
|
628
1130
|
const _component_USelect = __nuxt_component_4$2;
|
|
629
1131
|
const _component_UInput = __nuxt_component_5$1;
|
|
630
|
-
const
|
|
631
|
-
const
|
|
632
|
-
const
|
|
1132
|
+
const _component_TasksTagsBar = __nuxt_component_7;
|
|
1133
|
+
const _component_TasksTaskDetailExecute = __nuxt_component_8;
|
|
1134
|
+
const _component_UTextarea = __nuxt_component_9;
|
|
1135
|
+
const _component_UCheckbox = __nuxt_component_10;
|
|
633
1136
|
_push(ssrRenderComponent(_component_UModal, mergeProps({
|
|
634
1137
|
"model-value": __props.open,
|
|
635
|
-
ui: { width: "sm:max-w-
|
|
1138
|
+
ui: { width: "sm:max-w-6xl" },
|
|
636
1139
|
"onUpdate:modelValue": ($event) => emit("update:open", $event)
|
|
637
1140
|
}, _attrs), {
|
|
638
1141
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
@@ -641,9 +1144,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
641
1144
|
_push2(ssrRenderComponent(_component_UCard, { class: "task-drawer-card" }, {
|
|
642
1145
|
header: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
643
1146
|
if (_push3) {
|
|
644
|
-
_push3(`<div class="flex items-start justify-between gap-3" data-v-
|
|
1147
|
+
_push3(`<div class="flex items-start justify-between gap-3" data-v-f7c8f271${_scopeId2}><div class="min-w-0" data-v-f7c8f271${_scopeId2}><p class="text-xs text-gray-500" data-v-f7c8f271${_scopeId2}><code data-v-f7c8f271${_scopeId2}>${ssrInterpolate(__props.detail.task.id)}</code></p><h2 class="text-base font-semibold truncate"${ssrRenderAttr("title", __props.detail.task.name)} data-v-f7c8f271${_scopeId2}>${ssrInterpolate(__props.detail.task.name)}</h2><p class="text-xs text-gray-500 mt-0.5" data-v-f7c8f271${_scopeId2}>`);
|
|
645
1148
|
if (__props.detail.task.url) {
|
|
646
|
-
_push3(`<a${ssrRenderAttr("href", __props.detail.task.url)} target="_blank" rel="noopener" class="link" data-v-
|
|
1149
|
+
_push3(`<a${ssrRenderAttr("href", __props.detail.task.url)} target="_blank" rel="noopener" class="link" data-v-f7c8f271${_scopeId2}> Open in ${ssrInterpolate(__props.providerName)} \u2197 </a>`);
|
|
647
1150
|
} else {
|
|
648
1151
|
_push3(`<!---->`);
|
|
649
1152
|
}
|
|
@@ -714,17 +1217,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
714
1217
|
} else {
|
|
715
1218
|
_push3(`<!---->`);
|
|
716
1219
|
}
|
|
717
|
-
_push3(`<section class="drawer-section" data-v-
|
|
1220
|
+
_push3(`<div class="modal-body" data-v-f7c8f271${_scopeId2}><div class="left-col" data-v-f7c8f271${_scopeId2}><section class="drawer-section" data-v-f7c8f271${_scopeId2}><h3 class="section-title" data-v-f7c8f271${_scopeId2}>Description</h3>`);
|
|
718
1221
|
if (__props.detail.task.description) {
|
|
719
|
-
_push3(`<div class="desc" data-v-
|
|
1222
|
+
_push3(`<div class="desc" data-v-f7c8f271${_scopeId2}>`);
|
|
720
1223
|
_push3(ssrRenderComponent(_component_MarkdownContent, {
|
|
721
1224
|
content: __props.detail.task.description
|
|
722
1225
|
}, null, _parent3, _scopeId2));
|
|
723
1226
|
_push3(`</div>`);
|
|
724
1227
|
} else {
|
|
725
|
-
_push3(`<p class="muted" data-v-
|
|
1228
|
+
_push3(`<p class="muted" data-v-f7c8f271${_scopeId2}>No description.</p>`);
|
|
726
1229
|
}
|
|
727
|
-
_push3(`</section><section class="drawer-section" data-v-
|
|
1230
|
+
_push3(`</section><section class="drawer-section" data-v-f7c8f271${_scopeId2}><h3 class="section-title" data-v-f7c8f271${_scopeId2}>Status</h3><div class="status-row" data-v-f7c8f271${_scopeId2}>`);
|
|
728
1231
|
if (__props.statusOptions.length > 0) {
|
|
729
1232
|
_push3(ssrRenderComponent(_component_USelect, {
|
|
730
1233
|
"model-value": __props.statusDraft,
|
|
@@ -758,28 +1261,54 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
758
1261
|
}),
|
|
759
1262
|
_: 1
|
|
760
1263
|
}, _parent3, _scopeId2));
|
|
761
|
-
_push3(`</div></section><section class="drawer-section" data-v-
|
|
1264
|
+
_push3(`</div></section><section class="drawer-section" data-v-f7c8f271${_scopeId2}><div class="tags-header" data-v-f7c8f271${_scopeId2}><h3 class="section-title" data-v-f7c8f271${_scopeId2}>Tags</h3>`);
|
|
1265
|
+
if (__props.detail.task.tags.length > 0) {
|
|
1266
|
+
_push3(`<span class="tags-count" data-v-f7c8f271${_scopeId2}>${ssrInterpolate(__props.detail.task.tags.length)} applied </span>`);
|
|
1267
|
+
} else {
|
|
1268
|
+
_push3(`<!---->`);
|
|
1269
|
+
}
|
|
1270
|
+
_push3(`</div><div class="${ssrRenderClass([{ "tags-panel--saving": __props.tagSaving }, "tags-panel"])}" data-v-f7c8f271${_scopeId2}>`);
|
|
1271
|
+
_push3(ssrRenderComponent(_component_TasksTagsBar, {
|
|
1272
|
+
"model-value": __props.detail.task.tags,
|
|
1273
|
+
"suggested-tags": __props.suggestedTags,
|
|
1274
|
+
"other-tags": unref(otherTags),
|
|
1275
|
+
saving: __props.tagSaving,
|
|
1276
|
+
"onUpdate:modelValue": onTagsChanged,
|
|
1277
|
+
onRemoveOther: (tag) => emit("saveTags", [], [tag])
|
|
1278
|
+
}, null, _parent3, _scopeId2));
|
|
1279
|
+
_push3(`</div></section>`);
|
|
1280
|
+
_push3(ssrRenderComponent(_component_TasksTaskDetailExecute, {
|
|
1281
|
+
"task-id": __props.detail.task.id,
|
|
1282
|
+
cwd: __props.cwd,
|
|
1283
|
+
running: __props.execRunning,
|
|
1284
|
+
lines: __props.execLines,
|
|
1285
|
+
text: __props.execText,
|
|
1286
|
+
onRun: ($event) => emit("run"),
|
|
1287
|
+
onStop: ($event) => emit("stop"),
|
|
1288
|
+
onClear: ($event) => emit("clearExec")
|
|
1289
|
+
}, null, _parent3, _scopeId2));
|
|
1290
|
+
_push3(`</div><div class="right-col" data-v-f7c8f271${_scopeId2}><h3 class="section-title" data-v-f7c8f271${_scopeId2}>Comments (${ssrInterpolate(__props.detail.comments.length)})</h3><div class="comments-list" data-v-f7c8f271${_scopeId2}>`);
|
|
762
1291
|
if (__props.detail.comments.length > 0) {
|
|
763
|
-
_push3(
|
|
1292
|
+
_push3(`<!--[-->`);
|
|
764
1293
|
ssrRenderList(__props.detail.comments, (c) => {
|
|
765
|
-
_push3(`<article class="comment" data-v-
|
|
1294
|
+
_push3(`<article class="comment" data-v-f7c8f271${_scopeId2}><header class="comment-head" data-v-f7c8f271${_scopeId2}><span class="comment-author" data-v-f7c8f271${_scopeId2}>${ssrInterpolate(c.author || "unknown")}</span><span class="comment-date" data-v-f7c8f271${_scopeId2}>${ssrInterpolate(unref(formatTaskDate)(c.date))}</span></header><div class="comment-body" data-v-f7c8f271${_scopeId2}>`);
|
|
766
1295
|
_push3(ssrRenderComponent(_component_MarkdownContent, {
|
|
767
1296
|
content: c.text
|
|
768
1297
|
}, null, _parent3, _scopeId2));
|
|
769
1298
|
_push3(`</div></article>`);
|
|
770
1299
|
});
|
|
771
|
-
_push3(`<!--]
|
|
1300
|
+
_push3(`<!--]-->`);
|
|
772
1301
|
} else {
|
|
773
|
-
_push3(`<p class="muted" data-v-
|
|
1302
|
+
_push3(`<p class="muted" data-v-f7c8f271${_scopeId2}>No comments yet.</p>`);
|
|
774
1303
|
}
|
|
775
|
-
_push3(
|
|
1304
|
+
_push3(`</div><div class="comment-form" data-v-f7c8f271${_scopeId2}>`);
|
|
776
1305
|
_push3(ssrRenderComponent(_component_UTextarea, {
|
|
777
1306
|
"model-value": __props.commentDraft,
|
|
778
1307
|
placeholder: "Write a comment\u2026",
|
|
779
1308
|
rows: 3,
|
|
780
1309
|
"onUpdate:modelValue": ($event) => emit("update:commentDraft", $event)
|
|
781
1310
|
}, null, _parent3, _scopeId2));
|
|
782
|
-
_push3(`<div class="comment-actions" data-v-
|
|
1311
|
+
_push3(`<div class="comment-actions" data-v-f7c8f271${_scopeId2}>`);
|
|
783
1312
|
_push3(ssrRenderComponent(_component_UCheckbox, {
|
|
784
1313
|
"model-value": __props.commentAsAidev,
|
|
785
1314
|
label: "Send as [aidev] comment",
|
|
@@ -803,17 +1332,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
803
1332
|
}),
|
|
804
1333
|
_: 1
|
|
805
1334
|
}, _parent3, _scopeId2));
|
|
806
|
-
_push3(`</div></div></
|
|
807
|
-
_push3(ssrRenderComponent(_component_TasksTaskDetailExecute, {
|
|
808
|
-
"task-id": __props.detail.task.id,
|
|
809
|
-
cwd: __props.cwd,
|
|
810
|
-
running: __props.execRunning,
|
|
811
|
-
lines: __props.execLines,
|
|
812
|
-
text: __props.execText,
|
|
813
|
-
onRun: ($event) => emit("run"),
|
|
814
|
-
onStop: ($event) => emit("stop"),
|
|
815
|
-
onClear: ($event) => emit("clearExec")
|
|
816
|
-
}, null, _parent3, _scopeId2));
|
|
1335
|
+
_push3(`</div></div></div></div>`);
|
|
817
1336
|
} else {
|
|
818
1337
|
return [
|
|
819
1338
|
__props.error ? (openBlock(), createBlock(_component_UAlert, {
|
|
@@ -823,114 +1342,136 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
823
1342
|
title: __props.error,
|
|
824
1343
|
class: "mb-3"
|
|
825
1344
|
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
826
|
-
createVNode("
|
|
827
|
-
createVNode("
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
1345
|
+
createVNode("div", { class: "modal-body" }, [
|
|
1346
|
+
createVNode("div", { class: "left-col" }, [
|
|
1347
|
+
createVNode("section", { class: "drawer-section" }, [
|
|
1348
|
+
createVNode("h3", { class: "section-title" }, "Description"),
|
|
1349
|
+
__props.detail.task.description ? (openBlock(), createBlock("div", {
|
|
1350
|
+
key: 0,
|
|
1351
|
+
class: "desc"
|
|
1352
|
+
}, [
|
|
1353
|
+
createVNode(_component_MarkdownContent, {
|
|
1354
|
+
content: __props.detail.task.description
|
|
1355
|
+
}, null, 8, ["content"])
|
|
1356
|
+
])) : (openBlock(), createBlock("p", {
|
|
1357
|
+
key: 1,
|
|
1358
|
+
class: "muted"
|
|
1359
|
+
}, "No description."))
|
|
1360
|
+
]),
|
|
1361
|
+
createVNode("section", { class: "drawer-section" }, [
|
|
1362
|
+
createVNode("h3", { class: "section-title" }, "Status"),
|
|
1363
|
+
createVNode("div", { class: "status-row" }, [
|
|
1364
|
+
__props.statusOptions.length > 0 ? (openBlock(), createBlock(_component_USelect, {
|
|
1365
|
+
key: 0,
|
|
1366
|
+
"model-value": __props.statusDraft,
|
|
1367
|
+
options: __props.statusOptions,
|
|
1368
|
+
size: "sm",
|
|
1369
|
+
"onUpdate:modelValue": ($event) => emit("update:statusDraft", $event)
|
|
1370
|
+
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (openBlock(), createBlock(_component_UInput, {
|
|
1371
|
+
key: 1,
|
|
1372
|
+
"model-value": __props.statusDraft,
|
|
1373
|
+
placeholder: "status name",
|
|
1374
|
+
size: "sm",
|
|
1375
|
+
"onUpdate:modelValue": ($event) => emit("update:statusDraft", $event)
|
|
1376
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])),
|
|
1377
|
+
createVNode(_component_UButton, {
|
|
1378
|
+
size: "sm",
|
|
1379
|
+
color: "primary",
|
|
1380
|
+
loading: __props.statusSaving,
|
|
1381
|
+
disabled: __props.statusSaving || !__props.statusDraft || __props.statusDraft === __props.detail.task.status,
|
|
1382
|
+
onClick: ($event) => emit("changeStatus")
|
|
1383
|
+
}, {
|
|
1384
|
+
default: withCtx(() => [
|
|
1385
|
+
createTextVNode(" Update status ")
|
|
1386
|
+
]),
|
|
1387
|
+
_: 1
|
|
1388
|
+
}, 8, ["loading", "disabled", "onClick"])
|
|
1389
|
+
])
|
|
1390
|
+
]),
|
|
1391
|
+
createVNode("section", { class: "drawer-section" }, [
|
|
1392
|
+
createVNode("div", { class: "tags-header" }, [
|
|
1393
|
+
createVNode("h3", { class: "section-title" }, "Tags"),
|
|
1394
|
+
__props.detail.task.tags.length > 0 ? (openBlock(), createBlock("span", {
|
|
1395
|
+
key: 0,
|
|
1396
|
+
class: "tags-count"
|
|
1397
|
+
}, toDisplayString(__props.detail.task.tags.length) + " applied ", 1)) : createCommentVNode("", true)
|
|
865
1398
|
]),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
])
|
|
869
|
-
]),
|
|
870
|
-
createVNode("section", { class: "drawer-section" }, [
|
|
871
|
-
createVNode("h3", { class: "section-title" }, "Comments (" + toDisplayString(__props.detail.comments.length) + ")", 1),
|
|
872
|
-
__props.detail.comments.length > 0 ? (openBlock(), createBlock("div", {
|
|
873
|
-
key: 0,
|
|
874
|
-
class: "comments"
|
|
875
|
-
}, [
|
|
876
|
-
(openBlock(true), createBlock(Fragment, null, renderList(__props.detail.comments, (c) => {
|
|
877
|
-
return openBlock(), createBlock("article", {
|
|
878
|
-
key: c.id,
|
|
879
|
-
class: "comment"
|
|
1399
|
+
createVNode("div", {
|
|
1400
|
+
class: ["tags-panel", { "tags-panel--saving": __props.tagSaving }]
|
|
880
1401
|
}, [
|
|
881
|
-
createVNode(
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
"
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
createVNode("
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1402
|
+
createVNode(_component_TasksTagsBar, {
|
|
1403
|
+
"model-value": __props.detail.task.tags,
|
|
1404
|
+
"suggested-tags": __props.suggestedTags,
|
|
1405
|
+
"other-tags": unref(otherTags),
|
|
1406
|
+
saving: __props.tagSaving,
|
|
1407
|
+
"onUpdate:modelValue": onTagsChanged,
|
|
1408
|
+
onRemoveOther: (tag) => emit("saveTags", [], [tag])
|
|
1409
|
+
}, null, 8, ["model-value", "suggested-tags", "other-tags", "saving", "onRemoveOther"])
|
|
1410
|
+
], 2)
|
|
1411
|
+
]),
|
|
1412
|
+
createVNode(_component_TasksTaskDetailExecute, {
|
|
1413
|
+
"task-id": __props.detail.task.id,
|
|
1414
|
+
cwd: __props.cwd,
|
|
1415
|
+
running: __props.execRunning,
|
|
1416
|
+
lines: __props.execLines,
|
|
1417
|
+
text: __props.execText,
|
|
1418
|
+
onRun: ($event) => emit("run"),
|
|
1419
|
+
onStop: ($event) => emit("stop"),
|
|
1420
|
+
onClear: ($event) => emit("clearExec")
|
|
1421
|
+
}, null, 8, ["task-id", "cwd", "running", "lines", "text", "onRun", "onStop", "onClear"])
|
|
1422
|
+
]),
|
|
1423
|
+
createVNode("div", { class: "right-col" }, [
|
|
1424
|
+
createVNode("h3", { class: "section-title" }, "Comments (" + toDisplayString(__props.detail.comments.length) + ")", 1),
|
|
1425
|
+
createVNode("div", { class: "comments-list" }, [
|
|
1426
|
+
__props.detail.comments.length > 0 ? (openBlock(true), createBlock(Fragment, { key: 0 }, renderList(__props.detail.comments, (c) => {
|
|
1427
|
+
return openBlock(), createBlock("article", {
|
|
1428
|
+
key: c.id,
|
|
1429
|
+
class: "comment"
|
|
1430
|
+
}, [
|
|
1431
|
+
createVNode("header", { class: "comment-head" }, [
|
|
1432
|
+
createVNode("span", { class: "comment-author" }, toDisplayString(c.author || "unknown"), 1),
|
|
1433
|
+
createVNode("span", { class: "comment-date" }, toDisplayString(unref(formatTaskDate)(c.date)), 1)
|
|
1434
|
+
]),
|
|
1435
|
+
createVNode("div", { class: "comment-body" }, [
|
|
1436
|
+
createVNode(_component_MarkdownContent, {
|
|
1437
|
+
content: c.text
|
|
1438
|
+
}, null, 8, ["content"])
|
|
1439
|
+
])
|
|
1440
|
+
]);
|
|
1441
|
+
}), 128)) : (openBlock(), createBlock("p", {
|
|
1442
|
+
key: 1,
|
|
1443
|
+
class: "muted"
|
|
1444
|
+
}, "No comments yet."))
|
|
1445
|
+
]),
|
|
1446
|
+
createVNode("div", { class: "comment-form" }, [
|
|
1447
|
+
createVNode(_component_UTextarea, {
|
|
1448
|
+
"model-value": __props.commentDraft,
|
|
1449
|
+
placeholder: "Write a comment\u2026",
|
|
1450
|
+
rows: 3,
|
|
1451
|
+
"onUpdate:modelValue": ($event) => emit("update:commentDraft", $event)
|
|
908
1452
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
909
|
-
createVNode(
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1453
|
+
createVNode("div", { class: "comment-actions" }, [
|
|
1454
|
+
createVNode(_component_UCheckbox, {
|
|
1455
|
+
"model-value": __props.commentAsAidev,
|
|
1456
|
+
label: "Send as [aidev] comment",
|
|
1457
|
+
"onUpdate:modelValue": ($event) => emit("update:commentAsAidev", $event)
|
|
1458
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1459
|
+
createVNode(_component_UButton, {
|
|
1460
|
+
size: "sm",
|
|
1461
|
+
color: "primary",
|
|
1462
|
+
loading: __props.commentSaving,
|
|
1463
|
+
disabled: __props.commentSaving || !__props.commentDraft.trim(),
|
|
1464
|
+
onClick: ($event) => emit("postComment")
|
|
1465
|
+
}, {
|
|
1466
|
+
default: withCtx(() => [
|
|
1467
|
+
createTextVNode(" Add comment ")
|
|
1468
|
+
]),
|
|
1469
|
+
_: 1
|
|
1470
|
+
}, 8, ["loading", "disabled", "onClick"])
|
|
1471
|
+
])
|
|
921
1472
|
])
|
|
922
1473
|
])
|
|
923
|
-
])
|
|
924
|
-
createVNode(_component_TasksTaskDetailExecute, {
|
|
925
|
-
"task-id": __props.detail.task.id,
|
|
926
|
-
cwd: __props.cwd,
|
|
927
|
-
running: __props.execRunning,
|
|
928
|
-
lines: __props.execLines,
|
|
929
|
-
text: __props.execText,
|
|
930
|
-
onRun: ($event) => emit("run"),
|
|
931
|
-
onStop: ($event) => emit("stop"),
|
|
932
|
-
onClear: ($event) => emit("clearExec")
|
|
933
|
-
}, null, 8, ["task-id", "cwd", "running", "lines", "text", "onRun", "onStop", "onClear"])
|
|
1474
|
+
])
|
|
934
1475
|
];
|
|
935
1476
|
}
|
|
936
1477
|
}),
|
|
@@ -986,114 +1527,136 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
986
1527
|
title: __props.error,
|
|
987
1528
|
class: "mb-3"
|
|
988
1529
|
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
989
|
-
createVNode("
|
|
990
|
-
createVNode("
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1530
|
+
createVNode("div", { class: "modal-body" }, [
|
|
1531
|
+
createVNode("div", { class: "left-col" }, [
|
|
1532
|
+
createVNode("section", { class: "drawer-section" }, [
|
|
1533
|
+
createVNode("h3", { class: "section-title" }, "Description"),
|
|
1534
|
+
__props.detail.task.description ? (openBlock(), createBlock("div", {
|
|
1535
|
+
key: 0,
|
|
1536
|
+
class: "desc"
|
|
1537
|
+
}, [
|
|
1538
|
+
createVNode(_component_MarkdownContent, {
|
|
1539
|
+
content: __props.detail.task.description
|
|
1540
|
+
}, null, 8, ["content"])
|
|
1541
|
+
])) : (openBlock(), createBlock("p", {
|
|
1542
|
+
key: 1,
|
|
1543
|
+
class: "muted"
|
|
1544
|
+
}, "No description."))
|
|
1545
|
+
]),
|
|
1546
|
+
createVNode("section", { class: "drawer-section" }, [
|
|
1547
|
+
createVNode("h3", { class: "section-title" }, "Status"),
|
|
1548
|
+
createVNode("div", { class: "status-row" }, [
|
|
1549
|
+
__props.statusOptions.length > 0 ? (openBlock(), createBlock(_component_USelect, {
|
|
1550
|
+
key: 0,
|
|
1551
|
+
"model-value": __props.statusDraft,
|
|
1552
|
+
options: __props.statusOptions,
|
|
1553
|
+
size: "sm",
|
|
1554
|
+
"onUpdate:modelValue": ($event) => emit("update:statusDraft", $event)
|
|
1555
|
+
}, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (openBlock(), createBlock(_component_UInput, {
|
|
1556
|
+
key: 1,
|
|
1557
|
+
"model-value": __props.statusDraft,
|
|
1558
|
+
placeholder: "status name",
|
|
1559
|
+
size: "sm",
|
|
1560
|
+
"onUpdate:modelValue": ($event) => emit("update:statusDraft", $event)
|
|
1561
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])),
|
|
1562
|
+
createVNode(_component_UButton, {
|
|
1563
|
+
size: "sm",
|
|
1564
|
+
color: "primary",
|
|
1565
|
+
loading: __props.statusSaving,
|
|
1566
|
+
disabled: __props.statusSaving || !__props.statusDraft || __props.statusDraft === __props.detail.task.status,
|
|
1567
|
+
onClick: ($event) => emit("changeStatus")
|
|
1568
|
+
}, {
|
|
1569
|
+
default: withCtx(() => [
|
|
1570
|
+
createTextVNode(" Update status ")
|
|
1571
|
+
]),
|
|
1572
|
+
_: 1
|
|
1573
|
+
}, 8, ["loading", "disabled", "onClick"])
|
|
1574
|
+
])
|
|
1575
|
+
]),
|
|
1576
|
+
createVNode("section", { class: "drawer-section" }, [
|
|
1577
|
+
createVNode("div", { class: "tags-header" }, [
|
|
1578
|
+
createVNode("h3", { class: "section-title" }, "Tags"),
|
|
1579
|
+
__props.detail.task.tags.length > 0 ? (openBlock(), createBlock("span", {
|
|
1580
|
+
key: 0,
|
|
1581
|
+
class: "tags-count"
|
|
1582
|
+
}, toDisplayString(__props.detail.task.tags.length) + " applied ", 1)) : createCommentVNode("", true)
|
|
1028
1583
|
]),
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
])
|
|
1032
|
-
]),
|
|
1033
|
-
createVNode("section", { class: "drawer-section" }, [
|
|
1034
|
-
createVNode("h3", { class: "section-title" }, "Comments (" + toDisplayString(__props.detail.comments.length) + ")", 1),
|
|
1035
|
-
__props.detail.comments.length > 0 ? (openBlock(), createBlock("div", {
|
|
1036
|
-
key: 0,
|
|
1037
|
-
class: "comments"
|
|
1038
|
-
}, [
|
|
1039
|
-
(openBlock(true), createBlock(Fragment, null, renderList(__props.detail.comments, (c) => {
|
|
1040
|
-
return openBlock(), createBlock("article", {
|
|
1041
|
-
key: c.id,
|
|
1042
|
-
class: "comment"
|
|
1584
|
+
createVNode("div", {
|
|
1585
|
+
class: ["tags-panel", { "tags-panel--saving": __props.tagSaving }]
|
|
1043
1586
|
}, [
|
|
1044
|
-
createVNode(
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
"
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
createVNode("
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1587
|
+
createVNode(_component_TasksTagsBar, {
|
|
1588
|
+
"model-value": __props.detail.task.tags,
|
|
1589
|
+
"suggested-tags": __props.suggestedTags,
|
|
1590
|
+
"other-tags": unref(otherTags),
|
|
1591
|
+
saving: __props.tagSaving,
|
|
1592
|
+
"onUpdate:modelValue": onTagsChanged,
|
|
1593
|
+
onRemoveOther: (tag) => emit("saveTags", [], [tag])
|
|
1594
|
+
}, null, 8, ["model-value", "suggested-tags", "other-tags", "saving", "onRemoveOther"])
|
|
1595
|
+
], 2)
|
|
1596
|
+
]),
|
|
1597
|
+
createVNode(_component_TasksTaskDetailExecute, {
|
|
1598
|
+
"task-id": __props.detail.task.id,
|
|
1599
|
+
cwd: __props.cwd,
|
|
1600
|
+
running: __props.execRunning,
|
|
1601
|
+
lines: __props.execLines,
|
|
1602
|
+
text: __props.execText,
|
|
1603
|
+
onRun: ($event) => emit("run"),
|
|
1604
|
+
onStop: ($event) => emit("stop"),
|
|
1605
|
+
onClear: ($event) => emit("clearExec")
|
|
1606
|
+
}, null, 8, ["task-id", "cwd", "running", "lines", "text", "onRun", "onStop", "onClear"])
|
|
1607
|
+
]),
|
|
1608
|
+
createVNode("div", { class: "right-col" }, [
|
|
1609
|
+
createVNode("h3", { class: "section-title" }, "Comments (" + toDisplayString(__props.detail.comments.length) + ")", 1),
|
|
1610
|
+
createVNode("div", { class: "comments-list" }, [
|
|
1611
|
+
__props.detail.comments.length > 0 ? (openBlock(true), createBlock(Fragment, { key: 0 }, renderList(__props.detail.comments, (c) => {
|
|
1612
|
+
return openBlock(), createBlock("article", {
|
|
1613
|
+
key: c.id,
|
|
1614
|
+
class: "comment"
|
|
1615
|
+
}, [
|
|
1616
|
+
createVNode("header", { class: "comment-head" }, [
|
|
1617
|
+
createVNode("span", { class: "comment-author" }, toDisplayString(c.author || "unknown"), 1),
|
|
1618
|
+
createVNode("span", { class: "comment-date" }, toDisplayString(unref(formatTaskDate)(c.date)), 1)
|
|
1619
|
+
]),
|
|
1620
|
+
createVNode("div", { class: "comment-body" }, [
|
|
1621
|
+
createVNode(_component_MarkdownContent, {
|
|
1622
|
+
content: c.text
|
|
1623
|
+
}, null, 8, ["content"])
|
|
1624
|
+
])
|
|
1625
|
+
]);
|
|
1626
|
+
}), 128)) : (openBlock(), createBlock("p", {
|
|
1627
|
+
key: 1,
|
|
1628
|
+
class: "muted"
|
|
1629
|
+
}, "No comments yet."))
|
|
1630
|
+
]),
|
|
1631
|
+
createVNode("div", { class: "comment-form" }, [
|
|
1632
|
+
createVNode(_component_UTextarea, {
|
|
1633
|
+
"model-value": __props.commentDraft,
|
|
1634
|
+
placeholder: "Write a comment\u2026",
|
|
1635
|
+
rows: 3,
|
|
1636
|
+
"onUpdate:modelValue": ($event) => emit("update:commentDraft", $event)
|
|
1071
1637
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1072
|
-
createVNode(
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1638
|
+
createVNode("div", { class: "comment-actions" }, [
|
|
1639
|
+
createVNode(_component_UCheckbox, {
|
|
1640
|
+
"model-value": __props.commentAsAidev,
|
|
1641
|
+
label: "Send as [aidev] comment",
|
|
1642
|
+
"onUpdate:modelValue": ($event) => emit("update:commentAsAidev", $event)
|
|
1643
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1644
|
+
createVNode(_component_UButton, {
|
|
1645
|
+
size: "sm",
|
|
1646
|
+
color: "primary",
|
|
1647
|
+
loading: __props.commentSaving,
|
|
1648
|
+
disabled: __props.commentSaving || !__props.commentDraft.trim(),
|
|
1649
|
+
onClick: ($event) => emit("postComment")
|
|
1650
|
+
}, {
|
|
1651
|
+
default: withCtx(() => [
|
|
1652
|
+
createTextVNode(" Add comment ")
|
|
1653
|
+
]),
|
|
1654
|
+
_: 1
|
|
1655
|
+
}, 8, ["loading", "disabled", "onClick"])
|
|
1656
|
+
])
|
|
1084
1657
|
])
|
|
1085
1658
|
])
|
|
1086
|
-
])
|
|
1087
|
-
createVNode(_component_TasksTaskDetailExecute, {
|
|
1088
|
-
"task-id": __props.detail.task.id,
|
|
1089
|
-
cwd: __props.cwd,
|
|
1090
|
-
running: __props.execRunning,
|
|
1091
|
-
lines: __props.execLines,
|
|
1092
|
-
text: __props.execText,
|
|
1093
|
-
onRun: ($event) => emit("run"),
|
|
1094
|
-
onStop: ($event) => emit("stop"),
|
|
1095
|
-
onClear: ($event) => emit("clearExec")
|
|
1096
|
-
}, null, 8, ["task-id", "cwd", "running", "lines", "text", "onRun", "onStop", "onClear"])
|
|
1659
|
+
])
|
|
1097
1660
|
]),
|
|
1098
1661
|
_: 1
|
|
1099
1662
|
})) : createCommentVNode("", true)
|
|
@@ -1111,7 +1674,7 @@ _sfc_main$1.setup = (props, ctx) => {
|
|
|
1111
1674
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/tasks/TaskDetailModal.vue");
|
|
1112
1675
|
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
1113
1676
|
};
|
|
1114
|
-
const
|
|
1677
|
+
const __nuxt_component_6 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f7c8f271"]]);
|
|
1115
1678
|
function useTaskExecute(onError) {
|
|
1116
1679
|
const execLines = ref([]);
|
|
1117
1680
|
const execRunning = ref(false);
|
|
@@ -1166,6 +1729,10 @@ function useTasksPage() {
|
|
|
1166
1729
|
const commentDraft = ref("");
|
|
1167
1730
|
const commentAsAidev = ref(false);
|
|
1168
1731
|
const commentSaving = ref(false);
|
|
1732
|
+
const tagSaving = ref(false);
|
|
1733
|
+
const createModalOpen = ref(false);
|
|
1734
|
+
const createSaving = ref(false);
|
|
1735
|
+
const createError = ref("");
|
|
1169
1736
|
const {
|
|
1170
1737
|
execLines,
|
|
1171
1738
|
execRunning,
|
|
@@ -1207,18 +1774,21 @@ function useTasksPage() {
|
|
|
1207
1774
|
pollTimer = null;
|
|
1208
1775
|
}
|
|
1209
1776
|
}
|
|
1210
|
-
async function
|
|
1211
|
-
loading.value = true;
|
|
1777
|
+
async function fetchTasks(showSpinner = false) {
|
|
1778
|
+
if (showSpinner) loading.value = true;
|
|
1212
1779
|
loadError.value = "";
|
|
1213
1780
|
try {
|
|
1214
1781
|
data.value = await api("/api/tasks");
|
|
1215
1782
|
} catch (err) {
|
|
1216
1783
|
loadError.value = err instanceof Error ? err.message : String(err);
|
|
1217
1784
|
} finally {
|
|
1218
|
-
loading.value = false;
|
|
1785
|
+
if (showSpinner) loading.value = false;
|
|
1219
1786
|
syncPollTimer();
|
|
1220
1787
|
}
|
|
1221
1788
|
}
|
|
1789
|
+
async function reload() {
|
|
1790
|
+
return fetchTasks(true);
|
|
1791
|
+
}
|
|
1222
1792
|
async function loadProviderStatuses() {
|
|
1223
1793
|
if (providerStatuses.value.length > 0) return;
|
|
1224
1794
|
try {
|
|
@@ -1287,6 +1857,55 @@ function useTasksPage() {
|
|
|
1287
1857
|
commentSaving.value = false;
|
|
1288
1858
|
}
|
|
1289
1859
|
}
|
|
1860
|
+
const suggestedTags = computed(() => {
|
|
1861
|
+
var _a, _b;
|
|
1862
|
+
return (_b = (_a = data.value) == null ? void 0 : _a.suggestedTags) != null ? _b : [];
|
|
1863
|
+
});
|
|
1864
|
+
async function saveTags(addTags, removeTags) {
|
|
1865
|
+
var _a;
|
|
1866
|
+
if (!detail.value) return;
|
|
1867
|
+
if (addTags.length === 0 && removeTags.length === 0) return;
|
|
1868
|
+
tagSaving.value = true;
|
|
1869
|
+
detailError.value = "";
|
|
1870
|
+
try {
|
|
1871
|
+
await api(`/api/tasks/${encodeURIComponent(detail.value.task.id)}`, {
|
|
1872
|
+
method: "PATCH",
|
|
1873
|
+
body: { addTags, removeTags }
|
|
1874
|
+
});
|
|
1875
|
+
const t = detail.value.task;
|
|
1876
|
+
const next = new Set(t.tags);
|
|
1877
|
+
for (const tag of removeTags) next.delete(tag);
|
|
1878
|
+
for (const tag of addTags) next.add(tag);
|
|
1879
|
+
t.tags = [...next];
|
|
1880
|
+
const board = (_a = data.value) == null ? void 0 : _a.tasks.find((b) => b.id === t.id);
|
|
1881
|
+
if (board) board.tags = t.tags;
|
|
1882
|
+
} catch (err) {
|
|
1883
|
+
detailError.value = err instanceof Error ? err.message : String(err);
|
|
1884
|
+
} finally {
|
|
1885
|
+
tagSaving.value = false;
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
function openCreateModal() {
|
|
1889
|
+
createModalOpen.value = true;
|
|
1890
|
+
createError.value = "";
|
|
1891
|
+
}
|
|
1892
|
+
function closeCreateModal() {
|
|
1893
|
+
createModalOpen.value = false;
|
|
1894
|
+
createError.value = "";
|
|
1895
|
+
}
|
|
1896
|
+
async function createTask(params) {
|
|
1897
|
+
createSaving.value = true;
|
|
1898
|
+
createError.value = "";
|
|
1899
|
+
try {
|
|
1900
|
+
await api("/api/tasks", { method: "POST", body: params });
|
|
1901
|
+
createModalOpen.value = false;
|
|
1902
|
+
await fetchTasks(false);
|
|
1903
|
+
} catch (err) {
|
|
1904
|
+
createError.value = err instanceof Error ? err.message : String(err);
|
|
1905
|
+
} finally {
|
|
1906
|
+
createSaving.value = false;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1290
1909
|
function runExecute() {
|
|
1291
1910
|
if (!detail.value) return;
|
|
1292
1911
|
void startExecute(detail.value.task.id);
|
|
@@ -1328,7 +1947,16 @@ function useTasksPage() {
|
|
|
1328
1947
|
execText,
|
|
1329
1948
|
runExecute,
|
|
1330
1949
|
stopExecute,
|
|
1331
|
-
clearExecLines
|
|
1950
|
+
clearExecLines,
|
|
1951
|
+
suggestedTags,
|
|
1952
|
+
tagSaving,
|
|
1953
|
+
saveTags,
|
|
1954
|
+
createModalOpen,
|
|
1955
|
+
createSaving,
|
|
1956
|
+
createError,
|
|
1957
|
+
openCreateModal,
|
|
1958
|
+
closeCreateModal,
|
|
1959
|
+
createTask
|
|
1332
1960
|
};
|
|
1333
1961
|
}
|
|
1334
1962
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1362,7 +1990,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1362
1990
|
execText,
|
|
1363
1991
|
runExecute,
|
|
1364
1992
|
stopExecute,
|
|
1365
|
-
clearExecLines
|
|
1993
|
+
clearExecLines,
|
|
1994
|
+
suggestedTags,
|
|
1995
|
+
tagSaving,
|
|
1996
|
+
saveTags,
|
|
1997
|
+
createModalOpen,
|
|
1998
|
+
createSaving,
|
|
1999
|
+
createError,
|
|
2000
|
+
openCreateModal,
|
|
2001
|
+
closeCreateModal,
|
|
2002
|
+
createTask
|
|
1366
2003
|
} = useTasksPage();
|
|
1367
2004
|
return (_ctx, _push, _parent, _attrs) => {
|
|
1368
2005
|
var _a;
|
|
@@ -1371,18 +2008,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1371
2008
|
const _component_UAlert = __nuxt_component_2;
|
|
1372
2009
|
const _component_NuxtLink = __nuxt_component_0$3;
|
|
1373
2010
|
const _component_TasksBoard = __nuxt_component_4$1;
|
|
1374
|
-
const
|
|
1375
|
-
|
|
2011
|
+
const _component_TasksTaskCreateModal = __nuxt_component_5;
|
|
2012
|
+
const _component_TasksTaskDetailModal = __nuxt_component_6;
|
|
2013
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "tasks-page" }, _attrs))} data-v-c666eefa>`);
|
|
1376
2014
|
_push(ssrRenderComponent(_component_UCard, null, {
|
|
1377
2015
|
header: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1378
2016
|
if (_push2) {
|
|
1379
|
-
_push2(`<div class="flex items-center justify-between gap-3 flex-wrap" data-v-
|
|
2017
|
+
_push2(`<div class="flex items-center justify-between gap-3 flex-wrap" data-v-c666eefa${_scopeId}><div data-v-c666eefa${_scopeId}><h1 class="text-lg font-semibold" data-v-c666eefa${_scopeId}>Tasks</h1><p class="text-xs text-gray-500 mt-1" data-v-c666eefa${_scopeId}>`);
|
|
1380
2018
|
if (unref(data)) {
|
|
1381
|
-
_push2(`<span data-v-
|
|
2019
|
+
_push2(`<span data-v-c666eefa${_scopeId}> Provider: <code data-v-c666eefa${_scopeId}>${ssrInterpolate(unref(data).provider)}</code> \xB7 ${ssrInterpolate(unref(data).tasks.length)} task(s) </span>`);
|
|
1382
2020
|
} else {
|
|
1383
|
-
_push2(`<span data-v-
|
|
2021
|
+
_push2(`<span data-v-c666eefa${_scopeId}>\u2014</span>`);
|
|
1384
2022
|
}
|
|
1385
|
-
_push2(`</p></div>`);
|
|
2023
|
+
_push2(`</p></div><div class="flex items-center gap-2" data-v-c666eefa${_scopeId}>`);
|
|
2024
|
+
_push2(ssrRenderComponent(_component_UButton, {
|
|
2025
|
+
color: "primary",
|
|
2026
|
+
size: "sm",
|
|
2027
|
+
disabled: !unref(data),
|
|
2028
|
+
onClick: unref(openCreateModal)
|
|
2029
|
+
}, {
|
|
2030
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2031
|
+
if (_push3) {
|
|
2032
|
+
_push3(` New Task `);
|
|
2033
|
+
} else {
|
|
2034
|
+
return [
|
|
2035
|
+
createTextVNode(" New Task ")
|
|
2036
|
+
];
|
|
2037
|
+
}
|
|
2038
|
+
}),
|
|
2039
|
+
_: 1
|
|
2040
|
+
}, _parent2, _scopeId));
|
|
1386
2041
|
_push2(ssrRenderComponent(_component_UButton, {
|
|
1387
2042
|
color: "gray",
|
|
1388
2043
|
variant: "ghost",
|
|
@@ -1402,7 +2057,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1402
2057
|
}),
|
|
1403
2058
|
_: 1
|
|
1404
2059
|
}, _parent2, _scopeId));
|
|
1405
|
-
_push2(`</div>`);
|
|
2060
|
+
_push2(`</div></div>`);
|
|
1406
2061
|
} else {
|
|
1407
2062
|
return [
|
|
1408
2063
|
createVNode("div", { class: "flex items-center justify-between gap-3 flex-wrap" }, [
|
|
@@ -1416,19 +2071,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1416
2071
|
])) : (openBlock(), createBlock("span", { key: 1 }, "\u2014"))
|
|
1417
2072
|
])
|
|
1418
2073
|
]),
|
|
1419
|
-
createVNode(
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
2074
|
+
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
2075
|
+
createVNode(_component_UButton, {
|
|
2076
|
+
color: "primary",
|
|
2077
|
+
size: "sm",
|
|
2078
|
+
disabled: !unref(data),
|
|
2079
|
+
onClick: unref(openCreateModal)
|
|
2080
|
+
}, {
|
|
2081
|
+
default: withCtx(() => [
|
|
2082
|
+
createTextVNode(" New Task ")
|
|
2083
|
+
]),
|
|
2084
|
+
_: 1
|
|
2085
|
+
}, 8, ["disabled", "onClick"]),
|
|
2086
|
+
createVNode(_component_UButton, {
|
|
2087
|
+
color: "gray",
|
|
2088
|
+
variant: "ghost",
|
|
2089
|
+
size: "sm",
|
|
2090
|
+
loading: unref(loading),
|
|
2091
|
+
disabled: unref(loading),
|
|
2092
|
+
onClick: unref(reload)
|
|
2093
|
+
}, {
|
|
2094
|
+
default: withCtx(() => [
|
|
2095
|
+
createTextVNode(" Refresh ")
|
|
2096
|
+
]),
|
|
2097
|
+
_: 1
|
|
2098
|
+
}, 8, ["loading", "disabled", "onClick"])
|
|
2099
|
+
])
|
|
1432
2100
|
])
|
|
1433
2101
|
];
|
|
1434
2102
|
}
|
|
@@ -1446,7 +2114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1446
2114
|
_push2(`<!---->`);
|
|
1447
2115
|
}
|
|
1448
2116
|
if (unref(data) && unref(data).tasks.length === 0 && !unref(loading)) {
|
|
1449
|
-
_push2(`<p class="empty-banner" data-v-
|
|
2117
|
+
_push2(`<p class="empty-banner" data-v-c666eefa${_scopeId}> No tasks \u2014 check `);
|
|
1450
2118
|
_push2(ssrRenderComponent(_component_NuxtLink, {
|
|
1451
2119
|
to: "/config",
|
|
1452
2120
|
class: "link"
|
|
@@ -1517,6 +2185,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1517
2185
|
}),
|
|
1518
2186
|
_: 1
|
|
1519
2187
|
}, _parent));
|
|
2188
|
+
_push(ssrRenderComponent(_component_TasksTaskCreateModal, {
|
|
2189
|
+
open: unref(createModalOpen),
|
|
2190
|
+
saving: unref(createSaving),
|
|
2191
|
+
error: unref(createError),
|
|
2192
|
+
"suggested-tags": unref(suggestedTags),
|
|
2193
|
+
"onUpdate:open": ($event) => createModalOpen.value = $event,
|
|
2194
|
+
onClose: unref(closeCreateModal),
|
|
2195
|
+
onSubmit: unref(createTask)
|
|
2196
|
+
}, null, _parent));
|
|
1520
2197
|
_push(ssrRenderComponent(_component_TasksTaskDetailModal, {
|
|
1521
2198
|
open: unref(drawerOpen),
|
|
1522
2199
|
detail: unref(detail),
|
|
@@ -1532,6 +2209,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1532
2209
|
"exec-running": unref(execRunning),
|
|
1533
2210
|
"exec-lines": unref(execLines),
|
|
1534
2211
|
"exec-text": unref(execText),
|
|
2212
|
+
"suggested-tags": unref(suggestedTags),
|
|
2213
|
+
"tag-saving": unref(tagSaving),
|
|
1535
2214
|
"onUpdate:open": ($event) => drawerOpen.value = $event,
|
|
1536
2215
|
onClose: unref(closeDrawer),
|
|
1537
2216
|
"onUpdate:statusDraft": ($event) => statusDraft.value = $event,
|
|
@@ -1541,7 +2220,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1541
2220
|
onPostComment: unref(postComment),
|
|
1542
2221
|
onRun: unref(runExecute),
|
|
1543
2222
|
onStop: unref(stopExecute),
|
|
1544
|
-
onClearExec: unref(clearExecLines)
|
|
2223
|
+
onClearExec: unref(clearExecLines),
|
|
2224
|
+
onSaveTags: unref(saveTags)
|
|
1545
2225
|
}, null, _parent));
|
|
1546
2226
|
_push(`</div>`);
|
|
1547
2227
|
};
|
|
@@ -1553,7 +2233,7 @@ _sfc_main.setup = (props, ctx) => {
|
|
|
1553
2233
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/tasks.vue");
|
|
1554
2234
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
1555
2235
|
};
|
|
1556
|
-
const tasks = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
2236
|
+
const tasks = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c666eefa"]]);
|
|
1557
2237
|
|
|
1558
2238
|
export { tasks as default };
|
|
1559
|
-
//# sourceMappingURL=tasks-
|
|
2239
|
+
//# sourceMappingURL=tasks-Bc5VRFpY.mjs.map
|