Skip to content

Commit 6bc092e

Browse files
Merge pull request #91 from JSON-ms/dev
Deployment of v1.2.18
2 parents 9268462 + 165563e commit 6bc092e

23 files changed

Lines changed: 1089 additions & 979 deletions

components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ declare module 'vue' {
3434
LocaleSwitcher: typeof import('./src/components/LocaleSwitcher.vue')['default']
3535
Logo: typeof import('./src/components/Logo.vue')['default']
3636
MigrationDialog: typeof import('./src/components/MigrationDialog.vue')['default']
37+
ModalDialog: typeof import('./src/components/ModalDialog.vue')['default']
3738
NewStructureModal: typeof import('./src/components/NewStructureModal.vue')['default']
3839
Prompt: typeof import('./src/components/Prompt.vue')['default']
3940
RouterLink: typeof import('vue-router')['RouterLink']

docs/structure.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ triggers:
447447
448448
# URL called when the trigger is executed
449449
url: https://json.ms/?action=build
450+
451+
# Location of the trigger button (structure, toolbar, data)
452+
location: editor
450453
451454
# HTTP method used for the request
452455
method: POST

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@json.ms/www",
33
"private": true,
44
"type": "module",
5-
"version": "1.2.16",
5+
"version": "1.2.18",
66
"scripts": {
77
"dev": "vite --host",
88
"build": "run-p type-check \"build-only {@}\" --",

src/assets/example-structure.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ triggers:
2222
label: Build
2323
icon: mdi-play
2424
url: [BUILD_URL]/build
25+
location: structure
2526
method: POST
2627
headers:
2728
Content-Type: application/json

src/components/ActionBar.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ import {useGlobalStore} from '@/stores/global';
66
import {computed} from "vue";
77
import {useTypings} from "@/composables/typings";
88
import {useModelStore} from "@/stores/model";
9+
import TriggerMenu from "@/components/TriggerMenu.vue";
10+
import type {IStructure, IStructureData} from "@/interfaces";
11+
12+
const structure = defineModel<IStructure>({ required: true });
13+
const { structureData, userData } = defineProps<{
14+
structureData: IStructureData,
15+
userData: any,
16+
}>();
917
1018
const globalStore = useGlobalStore();
1119
const modelStore = useModelStore();
@@ -56,6 +64,12 @@ const reset = () => {
5664
</script>
5765

5866
<template>
67+
<TriggerMenu
68+
:model-value="structureData"
69+
:structure="structure"
70+
:user-data="userData"
71+
location="data"
72+
/>
5973
<div
6074
v-if="globalStore.session.loggedIn"
6175
class="w-100 pr-3"

src/components/EndpointManagerModal.vue

Lines changed: 61 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {deepToRaw} from '@/utils';
77
import {useStructure} from '@/composables/structure';
88
import Rules from '@/rules';
99
import {useEndpoints} from "@/composables/endpoints";
10+
import ModalDialog from '@/components/ModalDialog.vue';
1011
1112
const globalStore = useGlobalStore();
1213
const visible = defineModel<boolean>({ default: false });
@@ -68,75 +69,72 @@ watch(visible, () => {
6869
</script>
6970

7071
<template>
71-
<v-dialog
72+
<ModalDialog
7273
v-model="visible"
7374
:persistent="!isPristine"
75+
title="Endpoint Manager"
76+
prepend-icon="mdi-webhook"
7477
width="600"
7578
scrollable
7679
>
77-
<v-card
78-
title="Endpoint Manager"
79-
prepend-icon="mdi-webhook"
80-
>
81-
<v-card-text>
80+
<v-card-text>
8281

83-
<p class="mb-4">
84-
Every endpoint you create instantiate a new <i>cypher</i> and <i>secret API key</i> that you can reuse with other projects. That way, you can centralize your data on a specific server if required.
85-
</p>
82+
<p class="mb-4">
83+
Every endpoint you create instantiate a new <i>cypher</i> and <i>secret API key</i> that you can reuse with other projects. That way, you can centralize your data on a specific server if required.
84+
</p>
8685

87-
<v-alert type="info" variant="tonal" class="mb-4">
88-
To get assistance with running your own endpoint instance, be sure to consult the Integration panel.
89-
</v-alert>
86+
<v-alert type="info" variant="tonal" class="mb-4">
87+
To get assistance with running your own endpoint instance, be sure to consult the Integration panel.
88+
</v-alert>
9089

91-
<ListBuilder
92-
v-model="endpointList"
93-
:disabled="saving"
94-
:remove-item-callback="onRemoveItemCallback"
95-
:default-item="{
96-
url: '',
97-
secret: '',
98-
cypher: '',
99-
}"
100-
>
101-
<template #default="{ item }">
102-
<v-text-field
103-
v-model="item.url"
104-
:rules="getStructureRules('server_url')"
105-
clearable
106-
required
107-
persistent-hint
108-
hint="This field is required"
109-
>
110-
<template #label>
111-
<span class="mr-2 text-error">*</span> Endpoint
112-
</template>
113-
<template v-if="item.url && Rules.isUrl(item.url) && !item.url.startsWith('https://')" #message>
114-
<span class="text-error">It is not safe to use an unsecured protocol (HTTP) to communicate your data. Please be aware that your information may be vulnerable to interception by unauthorized parties. For your safety, we recommend using a secure connection (HTTPS) to protect your sensitive data during transmission.</span>
115-
</template>
116-
<template v-if="!item.uuid" #prepend-inner>
117-
<v-icon icon="mdi-new-box" />
118-
</template>
119-
</v-text-field>
120-
</template>
121-
</ListBuilder>
122-
</v-card-text>
123-
<v-card-actions>
124-
<v-btn
125-
:loading="saving"
126-
:disabled="isPristine || saving"
127-
:color="isPristine ? undefined : 'primary'"
128-
variant="flat"
129-
@click="save"
130-
>
131-
Save and close
132-
</v-btn>
133-
<v-btn
134-
:disabled="saving"
135-
@click="close"
136-
>
137-
Cancel
138-
</v-btn>
139-
</v-card-actions>
140-
</v-card>
141-
</v-dialog>
90+
<ListBuilder
91+
v-model="endpointList"
92+
:disabled="saving"
93+
:remove-item-callback="onRemoveItemCallback"
94+
:default-item="{
95+
url: '',
96+
secret: '',
97+
cypher: '',
98+
}"
99+
>
100+
<template #default="{ item }">
101+
<v-text-field
102+
v-model="item.url"
103+
:rules="getStructureRules('server_url')"
104+
clearable
105+
required
106+
persistent-hint
107+
hint="This field is required"
108+
>
109+
<template #label>
110+
<span class="mr-2 text-error">*</span> Endpoint
111+
</template>
112+
<template v-if="item.url && Rules.isUrl(item.url) && !item.url.startsWith('https://')" #message>
113+
<span class="text-error">It is not safe to use an unsecured protocol (HTTP) to communicate your data. Please be aware that your information may be vulnerable to interception by unauthorized parties. For your safety, we recommend using a secure connection (HTTPS) to protect your sensitive data during transmission.</span>
114+
</template>
115+
<template v-if="!item.uuid" #prepend-inner>
116+
<v-icon icon="mdi-new-box" />
117+
</template>
118+
</v-text-field>
119+
</template>
120+
</ListBuilder>
121+
</v-card-text>
122+
<v-card-actions>
123+
<v-btn
124+
:loading="saving"
125+
:disabled="isPristine || saving"
126+
:color="isPristine ? undefined : 'primary'"
127+
variant="flat"
128+
@click="save"
129+
>
130+
Save and close
131+
</v-btn>
132+
<v-btn
133+
:disabled="saving"
134+
@click="close"
135+
>
136+
Cancel
137+
</v-btn>
138+
</v-card-actions>
139+
</ModalDialog>
142140
</template>

src/components/Error.vue

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { useGlobalStore } from '@/stores/global';
3+
import ModalDialog from '@/components/ModalDialog.vue';
34
45
const globalStore = useGlobalStore();
56
const close = () => {
@@ -17,25 +18,22 @@ const close = () => {
1718
</script>
1819

1920
<template>
20-
<v-dialog
21+
<ModalDialog
2122
v-model="globalStore.error.visible"
23+
:text="globalStore.error.body"
24+
:title="globalStore.error.title || 'Error'"
25+
color="error"
26+
prepend-icon="mdi-alert"
27+
max-width="400"
2228
width="auto"
2329
persistent
2430
scrollable
2531
>
26-
<v-card
27-
:text="globalStore.error.body"
28-
:title="globalStore.error.title || 'Error'"
29-
color="error"
30-
prepend-icon="mdi-alert"
31-
max-width="400"
32-
>
33-
<template #actions>
34-
<v-btn
35-
text="Close"
36-
@click="close"
37-
/>
38-
</template>
39-
</v-card>
40-
</v-dialog>
32+
<v-card-actions>
33+
<v-btn
34+
text="Close"
35+
@click="close"
36+
/>
37+
</v-card-actions>
38+
</ModalDialog>
4139
</template>

0 commit comments

Comments
 (0)