diff --git a/src/components/AddFile.vue b/src/components/AddFile.vue new file mode 100644 index 0000000..fd971bb --- /dev/null +++ b/src/components/AddFile.vue @@ -0,0 +1,103 @@ + + + \ No newline at end of file diff --git a/src/components/AdminHeader.astro b/src/components/AdminHeader.astro index 236fb41..5666e4c 100644 --- a/src/components/AdminHeader.astro +++ b/src/components/AdminHeader.astro @@ -5,6 +5,7 @@
Add News Edit News + Add Image
diff --git a/src/pages/editor/add-file-list.astro b/src/pages/editor/add-file-list.astro new file mode 100644 index 0000000..afd049a --- /dev/null +++ b/src/pages/editor/add-file-list.astro @@ -0,0 +1,109 @@ +--- +import Layout from "../../layouts/Layout.astro"; +import AdminHeader from "../../components/AdminHeader.astro"; +--- + + +
+
+
+
+ + + + + + + + + +
IDStatusImage
+
+
+
+ + + + +
+ + + + +
+ +
+
+ diff --git a/src/pages/editor/add-file.astro b/src/pages/editor/add-file.astro index b61d0c4..eb995d8 100644 --- a/src/pages/editor/add-file.astro +++ b/src/pages/editor/add-file.astro @@ -1,35 +1,62 @@ --- import Layout from "../../layouts/Layout.astro"; +import AdminHeader from "../../components/AdminHeader.astro"; --- - +
-
-
- Select image to upload: - - -
-

Upload File

- - + +
+ +
+

Add File

+
+ + + + +
+ +
+ +
+ +
+
- + + function submitNewsImage(event) { + event.preventDefault(); + let formElement = document.getElementById('imageLink'); // Replace 'yourFormId' with the actual ID of your form + let formData = new FormData(formElement); // Pass the form element + + fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/no-file-add-file/`, { + method: 'POST', + body: formData, + }) + .then(response => response.json()) // Convert response to text + .then(data => { + console.log(data); + }) + .catch(error => { + console.error('Error occurred:', error); + }); + } + + + \ No newline at end of file diff --git a/src/pages/editor/add-news.astro b/src/pages/editor/add-news.astro index 2599d94..7744def 100644 --- a/src/pages/editor/add-news.astro +++ b/src/pages/editor/add-news.astro @@ -36,19 +36,22 @@ import AdminHeader from "../../components/AdminHeader.astro";
-
- - - -
-
+
+
+
+ + + + +
+ +