mirror of
https://github.com/quantum5/correcthorsebatterystaple.git
synced 2025-04-24 10:11:57 -04:00
Improve display of generated password on mobile (#15)
This commit is contained in:
parent
94d9ca92e3
commit
9cbf2f70dd
11
src/app.scss
11
src/app.scss
|
@ -65,4 +65,13 @@ body {
|
||||||
|
|
||||||
#faq .card {
|
#faq .card {
|
||||||
margin-bottom: $spacer;
|
margin-bottom: $spacer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#generated-password {
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
&.placeholder {
|
||||||
|
color: $input-placeholder-color;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -40,11 +40,11 @@
|
||||||
<p class="lead">This is a truly secure password generator that generates easy-to-remember passwords.</p>
|
<p class="lead">This is a truly secure password generator that generates easy-to-remember passwords.</p>
|
||||||
<hr class="my-4">
|
<hr class="my-4">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input id="generated-password" class="form-control form-control-lg text-monospace" type="text"
|
<div id="generated-password" class="form-control form-control-lg text-monospace placeholder">
|
||||||
placeholder="Click the Generate button to generate a new password" autocomplete="off" readonly>
|
Click the Generate button to generate a new password</div>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-success copy" type="button" id="copy-password"
|
<button class="btn btn-success copy" type="button" id="copy-password"
|
||||||
data-clipboard-target="#generated-password">
|
data-clipboard-target="#generated-password" disabled>
|
||||||
<%= require('octicons').clippy.toSVG({ height: 20 }) %>
|
<%= require('octicons').clippy.toSVG({ height: 20 }) %>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -60,7 +60,8 @@ $(() => {
|
||||||
|
|
||||||
$('#run-generator').click(() => {
|
$('#run-generator').click(() => {
|
||||||
const options = $options.serializeObject()
|
const options = $options.serializeObject()
|
||||||
$output.val(generate(options))
|
$output.text(generate(options)).removeClass('placeholder')
|
||||||
|
$('#copy-password').prop('disabled', false)
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue