diff --git a/.gitignore b/.gitignore index 40b878db5b1c97fc77049537a71bb2e249abe5dc..3ec544c7a4a5b0f726e269c7550d227a9093f779 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules/ \ No newline at end of file +node_modules/ +.env \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 77e0ccac8f0f3f87d9683f5507999f3c74b4ff9b..19181f42b4f62ea25a6c3139c2a7f6a1d4d6ab60 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -786,6 +786,23 @@ "peerDependencies": { "typescript": "*" } + }, + "node_modules/vue3-toastify": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/vue3-toastify/-/vue3-toastify-0.2.2.tgz", + "integrity": "sha512-D8pmIp2UeU8MU1OY7GktA70HviZ38b1RagN82P7tFu3abUD86w+PjfmbdRch4QVtjVxK+eqKLvi5cXJRndwJfw==", + "engines": { + "node": ">=18.18.0", + "npm": ">=9.0.0" + }, + "peerDependencies": { + "vue": ">=3.2.0" + }, + "peerDependenciesMeta": { + "vue": { + "optional": true + } + } } } } diff --git a/node_modules/.vite/deps/_metadata.json b/node_modules/.vite/deps/_metadata.json index 59a05b6d1430b37a814e1b206e64ff4f27fb3d7f..22e1c16e9203c18b668bee5ea23a0359d22b7aca 100644 --- a/node_modules/.vite/deps/_metadata.json +++ b/node_modules/.vite/deps/_metadata.json @@ -1,19 +1,25 @@ { - "hash": "73db24cd", + "hash": "1470842e", "configHash": "f2578dad", - "lockfileHash": "5238c63e", - "browserHash": "33d3d47c", + "lockfileHash": "575567d3", + "browserHash": "c1417137", "optimized": { "lottie-web-vue": { "src": "../../lottie-web-vue/dist/lottie-web-vue.js", "file": "lottie-web-vue.js", - "fileHash": "d3bf8cec", + "fileHash": "2e5cbcda", "needsInterop": false }, "vue": { "src": "../../vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "f281c34a", + "fileHash": "de4f6de6", + "needsInterop": false + }, + "vue3-toastify": { + "src": "../../vue3-toastify/dist/index.mjs", + "file": "vue3-toastify.js", + "fileHash": "5fcfc74f", "needsInterop": false } }, diff --git a/package-lock.json b/package-lock.json index 3f22dc2d41c71301edfeeca6cf17b8fd9e50d824..f7d0eb35ef4aca3cfd05b14384bd06adfe220e3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "dependencies": { "@lottiefiles/vue-lottie-player": "^1.1.0", "lottie-web-vue": "^2.0.7", - "vue": "^3.4.21" + "vue": "^3.4.21", + "vue3-toastify": "^0.2.2" }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", @@ -1306,6 +1307,23 @@ "peerDependencies": { "typescript": "*" } + }, + "node_modules/vue3-toastify": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/vue3-toastify/-/vue3-toastify-0.2.2.tgz", + "integrity": "sha512-D8pmIp2UeU8MU1OY7GktA70HviZ38b1RagN82P7tFu3abUD86w+PjfmbdRch4QVtjVxK+eqKLvi5cXJRndwJfw==", + "engines": { + "node": ">=18.18.0", + "npm": ">=9.0.0" + }, + "peerDependencies": { + "vue": ">=3.2.0" + }, + "peerDependenciesMeta": { + "vue": { + "optional": true + } + } } } } diff --git a/package.json b/package.json index 65cdfd053fdb808904897fdb748894131a5a9eed..4bedf532938dde15fd5da2055596fc6424439241 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "dependencies": { "@lottiefiles/vue-lottie-player": "^1.1.0", "lottie-web-vue": "^2.0.7", - "vue": "^3.4.21" + "vue": "^3.4.21", + "vue3-toastify": "^0.2.2" }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", diff --git a/src/App.vue b/src/App.vue index 3ec14a2719f19c0111a897d49fe1c62c68f0db94..defd69dd5d06b4188da4da21d0829f4def1bbcb1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,10 @@ <script setup lang="ts"> import Form from "./components/Form.vue"; import Lottie from "./components/Lottie.vue"; +import helmutJsonDraft from "./assets/boilerplate.json"; + +import { toast } from "vue3-toastify"; +import "vue3-toastify/dist/index.css"; import { ref } from "vue"; @@ -15,13 +19,13 @@ let falseLoopStatus = ref(false); function playLottie(data: boolean) { playLottieStatus.value = data; - console.log( "play status shows:" + playLottieStatus.value); + console.log("play status shows:" + playLottieStatus.value); falseLoopStatus.value = false; } function pauseLottie(data: boolean) { pauseLottieStatus.value = data; - console.log( "pause shows:" + pauseLottieStatus.value); + console.log("pause shows:" + pauseLottieStatus.value); } function falseStatusLottieLoop(data: boolean) { @@ -29,6 +33,41 @@ function falseStatusLottieLoop(data: boolean) { console.log("stuck status = " + falseLoopStatus.value); } +function sendJson() { + const token = import.meta.env.VITE_HELMUT_TOKEN; + helmutJsonDraft.metadata[1].value = String(`BB${BBEcke.value}`); + helmutJsonDraft.metadata[2].value = String(vorname.value); + helmutJsonDraft.metadata[3].value = String(nachname.value); + helmutJsonDraft.metadata[4].value = String(funktionZeileEins.value); + helmutJsonDraft.metadata[5].value = String(funktionZeileZwei.value); + let outputPath = `G:/VPMS/00-Temp_Austausch/von_Helmut/Schwertgen, David/Bauchbinde_${nachname.value}.mp4`; + helmutJsonDraft.metadata[6].value = String(outputPath); + fetch("https://helmut.rbb-online.de/v1/io/jobs", { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + body: JSON.stringify(helmutJsonDraft), + }) + .then((response) => { + toast.success( + "Die Bauchbinde ist auf den Weg in deinen Helmut-Ordner! In circa 1 Minute ist sie da ...", + { + position: toast.POSITION.TOP_CENTER, + autoClose: 5000, + } + ); // ToastOptions + console.log(response); + }) + .catch((error) => { + // Handle any errors + toast.error("Something went wrong!", { + position: toast.POSITION.TOP_CENTER, + }); + console.log(error); + }); +} </script> <template> @@ -45,6 +84,7 @@ function falseStatusLottieLoop(data: boolean) { v-model:BBEcke="BBEcke" v-on:playLottie="playLottie" v-on:pauseLottie="pauseLottie" + v-on:sendJson="sendJson" :falseLoopStatus="falseLoopStatus" ></Form> diff --git a/src/assets/boilerplate.json b/src/assets/boilerplate.json new file mode 100644 index 0000000000000000000000000000000000000000..5e72d0c18e454d72a601ddfa78a8527ede3c2761 --- /dev/null +++ b/src/assets/boilerplate.json @@ -0,0 +1,217 @@ +{ + "profile": "666d6bb317e43b0001b8da17", + "source": "HK", + "name": "Trigger Nexrender Workflow", + "metadata": [ + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d6b42566c2c00017cd1fc", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 1 + } + ], + "name": "AE-Projektpfad", + "value": "file://sb-fbp-ist01/Transfer/CNC/Helmut/Helmut4/Admin/1 Vorlagen/nexrender/rbb24reportage_TUVersion.aep", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + }, + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d7074326e82000143ae3a", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 2 + } + ], + "name": "AE-Composition", + "value": "BBrechts", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + }, + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d70c9566c2c00017cd1fd", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 3 + } + ], + "name": "AE-Assets-VORNAME", + "value": "HORST", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + }, + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d70e7566c2c00017cd1fe", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 4 + } + ], + "name": "AE-Assets-NACHNAME", + "value": "KARACHO", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + }, + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d7111566c2c00017cd1ff", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 5 + } + ], + "name": "AE-Assets-FUNKTION1", + "value": "SHITPOSTER", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + }, + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d7125566c2c00017cd200", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 6 + } + ], + "name": "AE-Assets-FUNKTION2", + "value": "", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + }, + { + "splitsUUID": null, + "numSplits": null, + "splitDone": null, + "id": "666d963f326e82000143ae3b", + "parent": [ + { + "id": "666d6b2c566c2c00017cd1fb", + "name": "Trigger Nexrender Workflow", + "tags": ["IO"], + "order": 7 + } + ], + "name": "AE-Outputpath", + "value": "G:/VPMS/00-Temp_Austausch/von_Helmut/Schwertgen, David/rendered.mp4", + "valueObject": null, + "type": "STRING", + "values": [], + "customId": null, + "filterable": true, + "readonly": false, + "mandatory": true, + "preresolve": false, + "disabled": false, + "hide": false, + "regex": "", + "tags": null, + "inPointMarke": null, + "outPointMarke": null + } + ] +} diff --git a/src/components/Form.vue b/src/components/Form.vue index 3fd1ab6a8474667e82437a5c076f3d24847f435a..202f9f406326b14427a047bbaa7f1334a9b016af 100644 --- a/src/components/Form.vue +++ b/src/components/Form.vue @@ -1,5 +1,5 @@ <script setup lang="ts"> -const emit = defineEmits(["playLottie", "pauseLottie"]); +const emit = defineEmits(["playLottie", "pauseLottie", "sendJson"]); const vorname = defineModel("vorname"); const nachname = defineModel("nachname"); const funktionZeileEins = defineModel("funktionZeileEins"); @@ -23,14 +23,19 @@ const props = defineProps({ type: Boolean, required: true, }, -}) +}); watch( () => props.falseLoopStatus, () => { if (props.falseLoopStatus == true) { - startAnimation() + startAnimation(); } - }); + } +); + +function sendJson() { + emit("sendJson"); +} function writeJson() { // BL: nützlich, um den Datenpfad vom src im template oder output in Actions zu ändern, wenn wir das machen wollen @@ -111,6 +116,9 @@ function download(content: string, fileName: string, contentType: string) { </div> <div class="row"> <button class="jsonGenerate-btn" @click="writeJson"> + Animation herunterladen + </button> + <button class="jsonGenerate-btn" @click="sendJson"> Animation erzeugen </button> </div> @@ -211,7 +219,6 @@ function download(content: string, fileName: string, contentType: string) { } @media screen and (max-width: 480px) { - .playLottie-btn, .pauseLottie-btn, .jsonGenerate-btn {