Skip to content

Commit

Permalink
Added show password button to new sync password fields.
Browse files Browse the repository at this point in the history
Fixed Android bug when back button does not cause the correct action for certain screens.
Fixed Android button styles to remove hover/focus pseudo class styling.
Updated localised strings.
  • Loading branch information
nero120 committed Jan 5, 2020
1 parent 4ebff3b commit b721db8
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 54 deletions.
12 changes: 9 additions & 3 deletions css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ body {
transition: color ease-in-out 0.2s;
z-index: 10;

&:active {
background-color: $colour-link-highlight;
color: $colour-text1;
}

&.fixed {
position: fixed;
bottom: 1rem;
Expand Down Expand Up @@ -357,7 +362,7 @@ body {
font-size: 0.9em;
color: $colour-text1;
border-radius: $border-radius-input;
background: #7db2be;
background-color: #7db2be;
z-index: 55;

&:focus {
Expand All @@ -368,6 +373,7 @@ body {
}
}

&:active,
&:hover {
background: $colour-bg2;
}
Expand Down Expand Up @@ -537,7 +543,7 @@ body {
color: #fff;
background: $colour-danger;
padding: 0 0.5rem;
z-index: 20;
z-index: 60;
border-radius: $border-radius-input;
}

Expand Down Expand Up @@ -708,6 +714,7 @@ body {
line-height: 1.2rem;
max-width: 99%;

&:active,
&:hover,
&:focus {
cursor: pointer;
Expand All @@ -734,7 +741,6 @@ body {
}

.tags-input-container {
@extend .btn-icon-container;
border-radius: $border-radius-input;
background-color: $colour-text1;
overflow: hidden;
Expand Down
1 change: 1 addition & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ xBrowserSync.App.Controller = function ($q, $timeout, platform, globals, api, ut
vm.sync.password = '';
vm.sync.passwordComplexity = {};
vm.sync.passwordConfirmation = null;
vm.sync.showPassword = false;
vm.sync.upgradeConfirmed = false;
if (vm.syncForm) {
vm.syncForm.$setPristine();
Expand Down
70 changes: 33 additions & 37 deletions platform/android/css/platform.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,36 +92,19 @@ body {
}

button.btn {
&.btn-default {
&:not([disabled]):active:hover {
background-color: $colour-text1;
color: $colour-link-highlight;
border-color: $colour-text1;
}

&:not([disabled]):hover {
&.btn-default:not([disabled]) {
&:hover,
&:focus {
background-color: transparent;
color: $colour-text1;
border-color: $colour-text1;
}

&:not([disabled]):focus {
text-decoration: none;
}
}

&.btn-default:not([disabled]):focus {
text-decoration: none;
}

&.btn-icon {
&:active:hover {
i {
opacity: 1;
}
}

&:hover {
&:hover,
&:focus {
i {
opacity: 0.4;
}
Expand All @@ -148,6 +131,18 @@ body {
height: 100vh;
}

.form-group {
&.btn-icon-container {
.btn-icon {
&:focus,
&:hover {
background-color: #7db2be;
border: none;
}
}
}
}

.header-panel {
font-size: 1.5rem;
margin-bottom: 0.75rem;
Expand Down Expand Up @@ -177,23 +172,17 @@ body {
}

.well {
.btn.btn-default {
color: $colour-text2;
border-color: $colour-text2;
font-weight: normal;
border-width: 1px;
button.btn.btn-default {
font-size: 1rem;

&:not([disabled]):active:hover {
background-color: $colour-text2;
color: $colour-link-highlight;
border-color: $colour-text2;
}

&:not([disabled]):hover {
background-color: transparent;
color: $colour-text2;
border-color: $colour-text2;
&:not([disabled]) {
&:hover,
&:focus {
background-color: transparent;
color: $colour-text2;
border-color: $colour-text2;
text-decoration: none;
}
}
}
}
Expand All @@ -215,6 +204,13 @@ body {
.badge {
font-size: 1rem;
line-height: 1.3rem;

&:focus,
&:hover {
i {
color: $colour-link;
}
}
}

.label {
Expand Down
7 changes: 5 additions & 2 deletions platform/android/js/platformImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ xBrowserSync.App.PlatformImplementation = function ($interval, $q, $timeout, pla
"message": "Local data has been refreshed, please redo previous unsynced changes."
},
"error_OutOfSync_Title": {
"message": "Data out of sync"
"message": "Sync conflict detected"
},
"error_OutOfSync_Message": {
"message": "Local data was out of sync and has now been refreshed. Please redo previous unsynced changes."
Expand Down Expand Up @@ -1570,7 +1570,10 @@ xBrowserSync.App.PlatformImplementation = function ($interval, $q, $timeout, pla
var handleBackButton = function (event) {
if (vm.view.current === vm.view.views.bookmark ||
vm.view.current === vm.view.views.settings ||
vm.view.current === vm.view.views.about
vm.view.current === vm.view.views.help ||
vm.view.current === vm.view.views.support ||
vm.view.current === vm.view.views.updated ||
vm.view.current === vm.view.views.scan
) {
// Back to login/search panel
event.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion platform/chrome/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
"message": "Local data has been refreshed, please redo previous unsynced changes."
},
"error_OutOfSync_Title": {
"message": "Daten nicht mehr synchron"
"message": "Sync conflict detected"
},
"error_OutOfSync_Message": {
"message": "Local data was out of sync and has now been refreshed. Please redo previous unsynced changes."
Expand Down
2 changes: 1 addition & 1 deletion platform/chrome/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
"message": "Local data has been refreshed, please redo previous unsynced changes."
},
"error_OutOfSync_Title": {
"message": "Data out of sync"
"message": "Sync conflict detected"
},
"error_OutOfSync_Message": {
"message": "Local data was out of sync and has now been refreshed. Please redo previous unsynced changes."
Expand Down
2 changes: 1 addition & 1 deletion platform/chrome/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
"message": "Local data has been refreshed, please redo previous unsynced changes."
},
"error_OutOfSync_Title": {
"message": "Données non synchronisées"
"message": "Sync conflict detected"
},
"error_OutOfSync_Message": {
"message": "Local data was out of sync and has now been refreshed. Please redo previous unsynced changes."
Expand Down
2 changes: 1 addition & 1 deletion platform/firefox/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
"message": "Local data has been refreshed, please redo previous unsynced changes."
},
"error_OutOfSync_Title": {
"message": "Data out of sync"
"message": "Sync conflict detected"
},
"error_OutOfSync_Message": {
"message": "Local data was out of sync and has now been refreshed. Please redo previous unsynced changes."
Expand Down
2 changes: 1 addition & 1 deletion views/bookmark.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2 data-ng-if="!vm.bookmark.displayUpdateForm">{{ vm.platform.GetConstant(vm.gl
placeholder="{{ vm.platform.GetConstant(vm.globals.Constants.Bookmark_DescriptionField_Label) }}"></textarea>
</div>
<div class="mobile-landscape">
<div class="form-group tags-input-container">
<div class="form-group tags-input-container btn-icon-container">
<label for="bookmarkTags" class="sr-only">{{ vm.platform.GetConstant(vm.globals.Constants.Bookmark_TagsField_Label)
}}</label>
<input type="text" class="form-control" name="bookmarkTags"
Expand Down
28 changes: 21 additions & 7 deletions views/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@
data-ng-show="vm.sync.displayNewSyncPanel">
<div data-ng-if="!vm.utility.IsMobilePlatform(vm.platformName)">
<div class="animate-fade-in" data-ng-show="vm.sync.displayPasswordConfirmation">
<div class="form-group secret-form-group">
<div class="form-group secret-form-group btn-icon-container">
<label class="sr-only" for="txtPasswordConfirmation">{{
vm.platform.GetConstant(vm.globals.Constants.Login_PasswordConfirmationField_Label) }}</label>
<input name="txtPasswordConfirmation" data-ng-model="vm.sync.passwordConfirmation" type="password"
class="form-control" maxlength="150"
placeholder="{{ vm.platform.GetConstant(vm.globals.Constants.Login_PasswordConfirmationField_Label) }}" />
<input class="form-control" name="txtPasswordConfirmation" data-ng-model="vm.sync.passwordConfirmation"
type="{{ vm.sync.showPassword ? 'text' : 'password' }}" maxlength="150"
placeholder="{{ vm.platform.GetConstant(vm.globals.Constants.Login_PasswordConfirmationField_Label) }}"
spellcheck="false" />
<button class="btn btn-icon btn-show-password" data-ng-class="{ 'active': vm.sync.showPassword }"
data-ng-show="vm.sync.password"
title="{{ vm.platform.GetConstant(vm.globals.Constants.Button_ShowPassword_Label) }}"
data-ng-click="vm.events.syncForm_ShowPassword_Click()">
<i class="fas fa-eye" aria-hidden="true"></i>
</button>
</div>
<div class="form-group buttons">
<button type="button" class="btn btn-default btn-new-sync"
Expand All @@ -40,13 +47,20 @@
</div>
</div>
<div class="animate-fade-in" data-ng-hide="vm.sync.displayPasswordConfirmation">
<div class="form-group secret-form-group"
<div class="form-group secret-form-group btn-icon-container"
data-ng-class="{ true: 'has-error' }[vm.syncForm.$submitted && vm.syncForm.txtPassword.$invalid]">
<label class="sr-only" for="txtPassword">{{
vm.platform.GetConstant(vm.globals.Constants.Login_PasswordField_Label) }}</label>
<input name="txtPassword" data-ng-model="vm.sync.password" type="password" class="form-control"
data-zxcvbn="vm.sync.passwordComplexity" data-ng-disabled="vm.sync.enabled" maxlength="150"
<input class="form-control" name="txtPassword" data-ng-model="vm.sync.password"
type="{{ vm.sync.showPassword ? 'text' : 'password' }}" data-zxcvbn="vm.sync.passwordComplexity"
data-ng-disabled="vm.sync.enabled" maxlength="150" spellcheck="false"
placeholder="{{ vm.platform.GetConstant(vm.globals.Constants.Login_PasswordField_New_Description) }}" />
<button class="btn btn-icon btn-show-password" data-ng-class="{ 'active': vm.sync.showPassword }"
data-ng-show="vm.sync.password"
title="{{ vm.platform.GetConstant(vm.globals.Constants.Button_ShowPassword_Label) }}"
data-ng-click="vm.events.syncForm_ShowPassword_Click()">
<i class="fas fa-eye" aria-hidden="true"></i>
</button>
<div class="validation" data-ng-if="vm.sync.password && ((vm.sync.passwordComplexity.feedback.suggestions && vm.sync.passwordComplexity.feedback.suggestions.length > 0) ||
vm.sync.passwordComplexity.feedback.warning)">
{{ vm.sync.passwordComplexity.feedback.warning ? vm.sync.passwordComplexity.feedback.warning :
Expand Down

0 comments on commit b721db8

Please sign in to comment.