From 91b7f3980cc37b9a64e7b6716e7cd551795fff62 Mon Sep 17 00:00:00 2001
From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
Date: Mon, 14 Aug 2023 22:48:30 +0100
Subject: [PATCH] Change account icons
---
src/main/resources/static/images/eye-slash.svg | 5 +++++
src/main/resources/static/images/eye.svg | 4 ++++
src/main/resources/templates/account.html | 14 +++++++++++---
3 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 src/main/resources/static/images/eye-slash.svg
create mode 100644 src/main/resources/static/images/eye.svg
diff --git a/src/main/resources/static/images/eye-slash.svg b/src/main/resources/static/images/eye-slash.svg
new file mode 100644
index 000000000..c5208375a
--- /dev/null
+++ b/src/main/resources/static/images/eye-slash.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/src/main/resources/static/images/eye.svg b/src/main/resources/static/images/eye.svg
new file mode 100644
index 000000000..412ff6928
--- /dev/null
+++ b/src/main/resources/static/images/eye.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/main/resources/templates/account.html b/src/main/resources/templates/account.html
index 78d5bdddb..96421b5e8 100644
--- a/src/main/resources/templates/account.html
+++ b/src/main/resources/templates/account.html
@@ -71,9 +71,14 @@
-
-
-
+
+
+
+
@@ -90,11 +95,14 @@
function showApiKey() {
const apiKeyElement = document.getElementById("apiKey");
const copyBtn = document.getElementById("copyBtn");
+ const eyeIcon = document.getElementById("eyeIcon");
if (apiKeyElement.type === "password") {
apiKeyElement.type = "text";
+ eyeIcon.src = "images/eye-slash.svg";
copyBtn.disabled = false; // Enable copy button when API key is visible
} else {
apiKeyElement.type = "password";
+ eyeIcon.src = "images/eye.svg";
copyBtn.disabled = true; // Disable copy button when API key is hidden
}
}