diff --git a/app/dashboard/templates/dashboard/api_key.html b/app/dashboard/templates/dashboard/api_key.html index fa9ec87d..8981f155 100644 --- a/app/dashboard/templates/dashboard/api_key.html +++ b/app/dashboard/templates/dashboard/api_key.html @@ -19,11 +19,12 @@ You can install the Chrome extension on Chrome Store, - Firefox add-on on Firefox - and Safari extension on AppStore + Firefox add-on on Firefox + and Safari extension on AppStore
Please copy and paste the API key below into the extension to get started.
@@ -44,7 +45,16 @@ {% endif %} - +
+ +
+ + + +
+
+
@@ -105,5 +115,23 @@ } }); }); + + $(".toggle-api-key").on('click', function (event) { + let that = $(this); + let apiInput = that.parent().parent().parent().find("input"); + if (that.attr("data-show") === "off") { + let apiKey = $(this).attr("data-secret"); + apiInput.val(apiKey); + that.addClass("fe-eye-off"); + that.removeClass("fe-eye"); + that.attr("data-show", "on"); + } else { + that.removeClass("fe-eye-off"); + that.addClass("fe-eye"); + apiInput.val("**********"); + that.attr("data-show", "off"); + } + + }); {% endblock %} \ No newline at end of file diff --git a/server.py b/server.py index 5931d7fa..498d4d24 100644 --- a/server.py +++ b/server.py @@ -151,7 +151,10 @@ def fake_data(): db.session.commit() api_key = ApiKey.create(user_id=user.id, name="Chrome") - api_key.code = "code" + api_key.code = "codeCH" + + api_key = ApiKey.create(user_id=user.id, name="Firefox") + api_key.code = "codeFF" GenEmail.create_new(user.id, "e1@") GenEmail.create_new(user.id, "e2@")