Added 'copy-to-clipboard' for client ids
Change-Id: I3c40f4044c9c519bb8d8e3b7a5cdd387994f3aaa
diff --git a/Changes b/Changes
index e1cdb8d..cc2f5af 100755
--- a/Changes
+++ b/Changes
@@ -1,5 +1,4 @@
-0.42 2021-06-17
-0.42 2021-06-15
+0.42 2021-06-18
- Added GitHub based CI for perl.
- Added further methods for communicating JSON Files
with the server to the APIs (lerepp).
@@ -31,6 +30,7 @@
- Fix rendering bug in unauthenticated oauth route.
- Add option to toggle password fields.
- Add "copy to clipboard" feature for input fields.
+ - Add "copy to clipboard" for client id.
WARNING: Upgrading to Mojolicious 9.19 will
invalidate all sessions. This is a security update.
diff --git a/dev/scss/base/copyToClipboard.scss b/dev/scss/base/copyToClipboard.scss
index c792282..2c93b79 100644
--- a/dev/scss/base/copyToClipboard.scss
+++ b/dev/scss/base/copyToClipboard.scss
@@ -6,7 +6,7 @@
width: 1em;
content: $fa-copy;
cursor: pointer;
- margin-left: .2em;
+ margin-left: .4em;
margin-top: .6em;
font-size: 130%;
}
diff --git a/dev/scss/main/oauth.scss b/dev/scss/main/oauth.scss
index 7a7f5fa..db8e09d 100644
--- a/dev/scss/main/oauth.scss
+++ b/dev/scss/main/oauth.scss
@@ -20,8 +20,9 @@
}
}
- input[readonly] {
- margin: 6pt 0;
+ br {
+ display: block;
+ margin: 3pt 0;
}
}
diff --git a/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep b/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep
index b8f5212..28074ea 100644
--- a/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep
+++ b/lib/Kalamar/Plugin/Auth/templates/auth/client.html.ep
@@ -17,7 +17,7 @@
<p><%= loc 'Auth_clientType' %>: <tt><%= stash 'client_type' %></tt></p>
%= label_for 'client_id' => loc('Auth_clientID')
- %= text_field 'client_id', stash('client_id'), readonly => 'readonly'
+ %= text_field 'client_id', stash('client_id'), readonly => 'readonly', class => 'copy-to-clipboard'
% if (stash('client_type') && stash('client_type') ne 'PUBLIC') {
<div>
%= label_for 'client_secret' => loc('Auth_clientSecret')