Skip to content
Snippets Groups Projects
Commit 3a067c50 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #695 from nextcloud/shake-wrong-password

Shake the login fields if password is wrong
parents dbf3ca5b d97fe177
No related branches found
No related tags found
No related merge requests found
...@@ -310,3 +310,17 @@ input:disabled+label, input:disabled:hover+label, input:disabled:focus+label { ...@@ -310,3 +310,17 @@ input:disabled+label, input:disabled:hover+label, input:disabled:focus+label {
background-color: #00a2e9; background-color: #00a2e9;
color: #bbb; color: #bbb;
} }
@keyframes shake {
0% { transform: translate(-5px, 0); }
20% { transform: translate(5px, 0); }
40% { transform: translate(-5px, 0); }
60% { transform: translate(5px, 0); }
80% { transform: translate(-5px, 0); }
100% { transform: translate(5px, 0); }
}
.shake {
animation-name: shake;
animation-duration: .3s;
animation-timing-function: ease-out;
}
...@@ -38,7 +38,7 @@ script('core', [ ...@@ -38,7 +38,7 @@ script('core', [
<!-- the following div ensures that the spinner is always inside the #message div --> <!-- the following div ensures that the spinner is always inside the #message div -->
<div style="clear: both;"></div> <div style="clear: both;"></div>
</div> </div>
<p class="grouptop"> <p class="grouptop<?php if (!empty($_['invalidpassword'])) { ?> shake<?php } ?>">
<input type="text" name="user" id="user" <input type="text" name="user" id="user"
placeholder="<?php p($l->t('Username or email')); ?>" placeholder="<?php p($l->t('Username or email')); ?>"
value="<?php p($_['loginName']); ?>" value="<?php p($_['loginName']); ?>"
...@@ -47,7 +47,7 @@ script('core', [ ...@@ -47,7 +47,7 @@ script('core', [
<label for="user" class="infield"><?php p($l->t('Username or email')); ?></label> <label for="user" class="infield"><?php p($l->t('Username or email')); ?></label>
</p> </p>
<p class="groupbottom"> <p class="groupbottom<?php if (!empty($_['invalidpassword'])) { ?> shake<?php } ?>">
<input type="password" name="password" id="password" value="" <input type="password" name="password" id="password" value=""
placeholder="<?php p($l->t('Password')); ?>" placeholder="<?php p($l->t('Password')); ?>"
<?php p($_['user_autofocus'] ? '' : 'autofocus'); ?> <?php p($_['user_autofocus'] ? '' : 'autofocus'); ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment