diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 43892fc..977a5cd 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -12,6 +12,7 @@ "@fortawesome/fontawesome-svg-core": "^6.7.2", "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/vue-fontawesome": "^3.0.8", + "js-confetti": "^0.12.0", "mitt": "^3.0.1", "vue": "^3.5.13", "vue-router": "^4.5.0", @@ -1267,6 +1268,12 @@ "node": ">=8" } }, + "node_modules/js-confetti": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/js-confetti/-/js-confetti-0.12.0.tgz", + "integrity": "sha512-1R0Akxn3Zn82pMqW65N1V2NwKkZJ75bvBN/VAb36Ya0YHwbaSiAJZVRr/19HBxH/O8x2x01UFAbYI18VqlDN6g==", + "license": "MIT" + }, "node_modules/magic-string": { "version": "0.30.17", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", diff --git a/webapp/package.json b/webapp/package.json index 6641b9b..c937e68 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -13,6 +13,7 @@ "@fortawesome/fontawesome-svg-core": "^6.7.2", "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/vue-fontawesome": "^3.0.8", + "js-confetti": "^0.12.0", "mitt": "^3.0.1", "vue": "^3.5.13", "vue-router": "^4.5.0", diff --git a/webapp/public/sounds/crazy-phrog-short.mp3 b/webapp/public/sounds/crazy-phrog-short.mp3 new file mode 100644 index 0000000..b030cff Binary files /dev/null and b/webapp/public/sounds/crazy-phrog-short.mp3 differ diff --git a/webapp/public/sounds/crazy-phrog.mp3 b/webapp/public/sounds/crazy-phrog.mp3 new file mode 100644 index 0000000..f0735b2 Binary files /dev/null and b/webapp/public/sounds/crazy-phrog.mp3 differ diff --git a/webapp/public/sounds/tada.mp3 b/webapp/public/sounds/tada.mp3 new file mode 100644 index 0000000..0abb906 Binary files /dev/null and b/webapp/public/sounds/tada.mp3 differ diff --git a/webapp/public/sounds/tada2.mp3 b/webapp/public/sounds/tada2.mp3 new file mode 100644 index 0000000..4a12917 Binary files /dev/null and b/webapp/public/sounds/tada2.mp3 differ diff --git a/webapp/src/assets/css/style.css b/webapp/src/assets/css/style.css index fb5b276..cbb4df9 100644 --- a/webapp/src/assets/css/style.css +++ b/webapp/src/assets/css/style.css @@ -279,6 +279,10 @@ button:focus-visible, text-align: left; padding: 5px; } +#dashboard .report .report-id { + text-align: center; + padding: 5px; +} #dashboard .report .report-date { text-align: right; padding: 5px; diff --git a/webapp/src/components/ReportBox.vue b/webapp/src/components/ReportBox.vue index 0910e62..5b449e4 100644 --- a/webapp/src/components/ReportBox.vue +++ b/webapp/src/components/ReportBox.vue @@ -22,6 +22,7 @@ defineProps({ diff --git a/webapp/src/views/BugAdd.vue b/webapp/src/views/BugAdd.vue index 821d131..acebb49 100644 --- a/webapp/src/views/BugAdd.vue +++ b/webapp/src/views/BugAdd.vue @@ -30,33 +30,6 @@
-
- - -
-

Vybrané súbory:

- -

- -    - {{ file.name }} ({{ formatFileSize(file.size) }}) -

-
-
-
-
-
- - Zrušiť - +
+ + Zrušiť + +
+ +

Poznamka: Subory je mozne pridat ako prilohy az po vytvoreni noveho reportu..

@@ -124,26 +99,6 @@ export default { }; }, methods: { - handleFileUpload(event) { - const files = event.target.files; - if (files) { - for (let i = 0; i < files.length; i++) { - this.selectedFiles.push(files[i]); - } - } - }, - removeFile(index) { - this.selectedFiles.splice(index, 1); - }, - formatFileSize(size) { - if (size < 1024) { - return size + " B"; - } else if (size < 1024 * 1024) { - return (size / 1024).toFixed(2) + " KB"; - } else { - return (size / (1024 * 1024)).toFixed(2) + " MB"; - } - }, submitForm() { this.loading = true; // Vytvorenie FormData objektu pre odoslanie súborov @@ -152,17 +107,11 @@ export default { formData.append("description", this.bugReport.description); formData.append("priority", this.bugReport.priority); - // Pridanie súborov do FormData - this.selectedFiles.forEach((file, index) => { - formData.append(`file${index}`, file); - }); - // Tu by nasledovalo odoslanie dát na server console.log("Odosielam bug report:", { title: this.bugReport.title, description: this.bugReport.description, priority: this.bugReport.priority, - files: this.selectedFiles.map((f) => f.name), }); backend .add( @@ -175,7 +124,7 @@ export default { .then((result) => { console.log(result); this.resetForm(); - this.$router.push("/"); + this.$router.push("/report/" + result.report_id); }) .catch((error) => { console.log(error); @@ -191,10 +140,6 @@ export default { priority: "", files: [], }; - this.selectedFiles = []; - // Resetovanie file input - const fileInput = document.getElementById("files"); - if (fileInput) fileInput.value = ""; }, }, }; diff --git a/webapp/src/views/Report.vue b/webapp/src/views/Report.vue index 8bb1e32..a07e905 100644 --- a/webapp/src/views/Report.vue +++ b/webapp/src/views/Report.vue @@ -28,6 +28,11 @@ Zmazať +
+ +

{{ report.report_title }} @@ -142,6 +147,7 @@