@frockbot/plugin-routines 0.3.46 → 0.3.48
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/package.json +8 -8
- package/src/client/RoutinesSection.vue +82 -57
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-routines",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.48",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@frockbot/client-core": "0.3.
|
|
37
|
-
"@frockbot/client-ui": "0.3.
|
|
38
|
-
"@frockbot/configuration-core": "0.3.
|
|
39
|
-
"@frockbot/kernel-agent-loop": "0.3.
|
|
40
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
41
|
-
"@frockbot/plugin-shell": "0.3.
|
|
36
|
+
"@frockbot/client-core": "0.3.48",
|
|
37
|
+
"@frockbot/client-ui": "0.3.48",
|
|
38
|
+
"@frockbot/configuration-core": "0.3.48",
|
|
39
|
+
"@frockbot/kernel-agent-loop": "0.3.48",
|
|
40
|
+
"@frockbot/kernel-contracts": "0.3.48",
|
|
41
|
+
"@frockbot/plugin-shell": "0.3.48",
|
|
42
42
|
"cordis": "4.0.0-rc.8",
|
|
43
43
|
"croner": "10.0.1",
|
|
44
44
|
"vue": "3.5.41",
|
|
45
|
-
"@frockbot/connection-core": "0.3.
|
|
45
|
+
"@frockbot/connection-core": "0.3.48"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/bun": "1.4.0",
|
|
@@ -86,12 +86,10 @@ const eventFields = computed(() => {
|
|
|
86
86
|
? [
|
|
87
87
|
{
|
|
88
88
|
key,
|
|
89
|
-
label:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.replaceAll("_", " ")
|
|
94
|
-
.replace(/^./, (letter) => letter.toUpperCase()),
|
|
89
|
+
label: (typeof value.title === "string" ? value.title : key)
|
|
90
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
91
|
+
.replaceAll("_", " ")
|
|
92
|
+
.replace(/^./, (letter) => letter.toUpperCase()),
|
|
95
93
|
hint:
|
|
96
94
|
typeof value.description === "string"
|
|
97
95
|
? value.description
|
|
@@ -641,60 +639,68 @@ async function toggleLog(routineId: string): Promise<void> {
|
|
|
641
639
|
</option>
|
|
642
640
|
</select>
|
|
643
641
|
</UiField>
|
|
644
|
-
<
|
|
645
|
-
v-
|
|
646
|
-
:key="
|
|
647
|
-
|
|
648
|
-
:
|
|
642
|
+
<details
|
|
643
|
+
v-if="eventFields.length"
|
|
644
|
+
:key="form.triggerType"
|
|
645
|
+
class="routine-form__options"
|
|
646
|
+
:open="eventFields.some((field) => field.required)"
|
|
649
647
|
>
|
|
650
|
-
<
|
|
651
|
-
|
|
652
|
-
v-
|
|
653
|
-
:
|
|
648
|
+
<summary>Event options</summary>
|
|
649
|
+
<UiField
|
|
650
|
+
v-for="field in eventFields"
|
|
651
|
+
:key="field.key"
|
|
652
|
+
:label="field.label"
|
|
653
|
+
:hint="field.hint"
|
|
654
654
|
>
|
|
655
|
-
<
|
|
656
|
-
|
|
657
|
-
v-
|
|
658
|
-
:
|
|
659
|
-
:value="option"
|
|
655
|
+
<select
|
|
656
|
+
v-if="field.options.length"
|
|
657
|
+
v-model="form.config[field.key]"
|
|
658
|
+
:required="field.required"
|
|
660
659
|
>
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
660
|
+
<option v-if="!field.required" value="">Any</option>
|
|
661
|
+
<option
|
|
662
|
+
v-for="option in field.options"
|
|
663
|
+
:key="option"
|
|
664
|
+
:value="option"
|
|
665
|
+
>
|
|
666
|
+
{{ option }}
|
|
667
|
+
</option>
|
|
668
|
+
</select>
|
|
669
|
+
<input
|
|
670
|
+
v-else-if="field.type === 'boolean'"
|
|
671
|
+
v-model="form.config[field.key]"
|
|
672
|
+
type="checkbox"
|
|
673
|
+
/>
|
|
674
|
+
<input
|
|
675
|
+
v-else-if="field.type === 'number' || field.type === 'integer'"
|
|
676
|
+
v-model.number="form.config[field.key]"
|
|
677
|
+
type="number"
|
|
678
|
+
:step="field.type === 'integer' ? 1 : 'any'"
|
|
679
|
+
:required="field.required"
|
|
680
|
+
/>
|
|
681
|
+
<textarea
|
|
682
|
+
v-else-if="field.type === 'array' || field.type === 'object'"
|
|
683
|
+
:value="
|
|
684
|
+
typeof form.config[field.key] === 'string'
|
|
685
|
+
? String(form.config[field.key])
|
|
686
|
+
: JSON.stringify(form.config[field.key], null, 2)
|
|
687
|
+
"
|
|
688
|
+
@input="
|
|
689
|
+
form.config[field.key] = (
|
|
690
|
+
$event.target as HTMLTextAreaElement
|
|
691
|
+
).value
|
|
692
|
+
"
|
|
693
|
+
:required="field.required"
|
|
694
|
+
rows="3"
|
|
695
|
+
/>
|
|
696
|
+
<input
|
|
697
|
+
v-else
|
|
698
|
+
v-model="form.config[field.key]"
|
|
699
|
+
:required="field.required"
|
|
700
|
+
maxlength="8000"
|
|
701
|
+
/>
|
|
702
|
+
</UiField>
|
|
703
|
+
</details>
|
|
698
704
|
</template>
|
|
699
705
|
</template>
|
|
700
706
|
<UiField
|
|
@@ -1001,4 +1007,23 @@ async function toggleLog(routineId: string): Promise<void> {
|
|
|
1001
1007
|
align-items: center;
|
|
1002
1008
|
gap: 6px;
|
|
1003
1009
|
}
|
|
1010
|
+
|
|
1011
|
+
.routine-form__options {
|
|
1012
|
+
color: var(--frock-text-muted);
|
|
1013
|
+
font-size: var(--frock-text-sm);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.routine-form__options summary {
|
|
1017
|
+
cursor: pointer;
|
|
1018
|
+
font-weight: 600;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.routine-form__options :deep(.ui-field) {
|
|
1022
|
+
margin-top: 12px;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.routine-form__options input[type="checkbox"] {
|
|
1026
|
+
width: auto;
|
|
1027
|
+
align-self: flex-start;
|
|
1028
|
+
}
|
|
1004
1029
|
</style>
|