diff --git a/assets/script.js b/assets/script.js index d980d0e..713f40f 100644 --- a/assets/script.js +++ b/assets/script.js @@ -28,6 +28,18 @@ function handleResponse(data, SuccessMessage, failureMessage) { } else { StatusMessageElement.innerText = failureMessage; } + + // Show the status message + StatusMessageElement.style.display = "block"; + setTimeout(() => { + // Hide the status message after 3 seconds + StatusMessageElement.style.opacity = 0; + setTimeout(() => { + StatusMessageElement.style.display = "none"; + // Reset opacity for future messages + StatusMessageElement.style.opacity = 1; + }, 500); + }, 3000); } function logout() { diff --git a/assets/style.css b/assets/style.css index 9da1dc7..f09e606 100644 --- a/assets/style.css +++ b/assets/style.css @@ -211,6 +211,20 @@ header ul li { margin-left: 20px; } +#StatusMessage { + display: none; + position: fixed; + top: 20px; + right: 20px; + padding: 10px; + background-color: var(--third-bg); + color: var(--primary-text); + border-radius: 5px; + opacity: 0; + transition: opacity 0.5s ease-in-out; +} + + /* */ /* ZAČÍNAJ VŠETKO S ".dashboard" */ @@ -221,5 +235,4 @@ header ul li { text-align: center; } - /* */ \ No newline at end of file diff --git a/templates/userActions.html b/templates/userActions.html index 7eaa25b..465a0b2 100644 --- a/templates/userActions.html +++ b/templates/userActions.html @@ -63,53 +63,14 @@ function init(){ getUserInfo(); } - - function displayUserInfo(userData) { - const tableContainer = document.getElementById("userInfoTable"); - tableContainer.innerHTML = ""; // Clear previous content - - const table = document.createElement("table"); - table.border = "1"; - - const headerRow = table.insertRow(0); - for (const key in userData) { - const th = document.createElement("th"); - th.appendChild(document.createTextNode(key)); - headerRow.appendChild(th); - } - - const dataRow = table.insertRow(1); - for (const key in userData) { - const td = document.createElement("td"); - td.appendChild(document.createTextNode(userData[key])); - dataRow.appendChild(td); - } - - tableContainer.appendChild(table); - } window.onload = init();

-
- -
-

Change Password

-
- -
- - -
- - -

-
-
-

Update User Profile

+

Update User


@@ -124,19 +85,7 @@
-

-
-
-

Get User Info

-
- -

-
- -
-

Update User Email

-

@@ -144,4 +93,17 @@

+
+

Change Password

+
+ +
+ + +
+ + +

+
+