Skip to content

Commit 317e697

Browse files
committed
Updated login form password fields to support Firefox native password features.
Refactored and improved how separators are identified and handled.
1 parent 50659b6 commit 317e697

File tree

14 files changed

+276
-220
lines changed

14 files changed

+276
-220
lines changed

src/modules/app/app-login/app-login.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
vm.platformSvc.getI18nString(vm.Strings.View.Login.Password.Label) }}</label>
6767
<input type="{{ vm.showPassword ? 'text' : 'password' }}" name="txtPassword" ng-model="vm.password"
6868
class="form-control" password-strength="vm.passwordComplexity" ng-disabled="vm.syncEnabled"
69-
maxlength="150" autocapitalize="off" autocorrect="off" spellcheck="false"
69+
maxlength="150" autocapitalize="off" autocomplete="new-password" autocorrect="off"
70+
spellcheck="false"
7071
placeholder="{{ vm.platformSvc.getI18nString(vm.Strings.View.Login.Password.New) }}" />
7172
<button class="btn btn-icon btn-show-password" ng-class="{ 'active': vm.showPassword }"
7273
ng-show="vm.password"

src/modules/app/app-search/bookmark-tree/bookmark-tree.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
enable-edit-button="!vm.utilitySvc.isMobilePlatform(vm.platformSvc.platformName)"
44
enable-select="vm.utilitySvc.isMobilePlatform(vm.platformSvc.platformName)"
55
is-selected="vm.selectedBookmark === bookmark.id" share-bookmark="vm.shareBookmark()"
6-
ng-class="{ 'folder': vm.bookmarkHelperSvc.isFolder(bookmark), 'open': bookmark.displayChildren, 'animate': vm.selectedBookmark === bookmark.id }"
6+
ng-class="{ 'folder': vm.isFolder(bookmark), 'open': bookmark.displayChildren, 'animate': vm.selectedBookmark === bookmark.id }"
77
hm-press="vm.utilitySvc.isMobilePlatform(vm.platformSvc.platformName) && bookmark.url && vm.utilitySvc.handleEvent(vm.selectBookmark(), $event, bookmark.id)">
88
<bookmark-tree ng-model="bookmark.children" selected-bookmark="vm.selectedBookmark" edit-bookmark="vm.editBookmark()"
99
select-bookmark="vm.selectBookmark()" share-bookmark="vm.shareBookmark()"

src/modules/app/app-search/bookmark-tree/bookmark-tree.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { Component, Input, Output } from 'angular-ts-decorators';
22
import autobind from 'autobind-decorator';
33
import BookmarkHelperService from '../../../shared/bookmark/bookmark-helper/bookmark-helper.service';
4+
import { BookmarkType } from '../../../shared/bookmark/bookmark.enum';
45
import { Bookmark } from '../../../shared/bookmark/bookmark.interface';
56
import { PlatformService } from '../../../shared/global-shared.interface';
67
import UtilityService from '../../../shared/utility/utility.service';
78
import AppHelperService from '../../shared/app-helper/app-helper.service';
9+
import { BookmarkTreeItem } from '../app-search.interface';
810

911
@autobind
1012
@Component({
@@ -41,4 +43,9 @@ export default class BookmarkTreeComponent {
4143
this.platformSvc = PlatformSvc;
4244
this.utilitySvc = UtilitySvc;
4345
}
46+
47+
isFolder(bookmark: BookmarkTreeItem): boolean {
48+
const bookmarkType = this.bookmarkHelperSvc.getBookmarkType(bookmark);
49+
return bookmarkType === BookmarkType.Container || bookmarkType === BookmarkType.Folder;
50+
}
4451
}

src/modules/app/app-search/bookmark/bookmark.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="separator" ng-if="vm.bookmarkHelperSvc.isSeparator(vm.bookmark)"></div>
1+
<div class="separator" ng-if="vm.isSeparator(vm.bookmark)"></div>
22
<div class="menu" ng-class="{ 'animate animate-fade-in': vm.enableSelect }" ng-if="vm.enableSelect"
33
ng-show="vm.isSelected" tabindex="-1">
44
<button class="btn btn-fab" title="{{ vm.platformSvc.getI18nString(vm.Strings.Button.ShareBookmark) }}"
@@ -18,7 +18,7 @@
1818
<span class="sr-only">{{ vm.platformSvc.getI18nString(vm.Strings.Button.DeleteBookmark) }}</span>
1919
</button>
2020
</div>
21-
<div class="bookmark-content" ng-if="vm.bookmark.url && !vm.bookmarkHelperSvc.isSeparator(vm.bookmark)"
21+
<div class="bookmark-content" ng-if="vm.bookmark.url && !vm.isSeparator(vm.bookmark)"
2222
ng-click="!vm.enableSelect && vm.utilitySvc.handleEvent(vm.appHelperSvc.openUrl, $event, vm.bookmark.url)"
2323
hm-tap="vm.utilitySvc.handleEvent(vm.appHelperSvc.openUrl, $event, vm.bookmark.url)">
2424
<h4 class="bookmark-heading" ng-if="vm.bookmark.title">{{ vm.bookmark.title }}</h4>
@@ -30,7 +30,7 @@ <h4 class="bookmark-heading" ng-if="!vm.bookmark.title">
3030
<div class="url">{{ vm.bookmark.url }}</div>
3131
</div>
3232
</div>
33-
<div class="bookmark-content" ng-if="!vm.bookmark.url && !vm.bookmarkHelperSvc.isSeparator(vm.bookmark)">
33+
<div class="bookmark-content" ng-if="!vm.bookmark.url && !vm.isSeparator(vm.bookmark)">
3434
<h4 class="bookmark-heading" ng-class="{ 'opening': vm.bookmark.open && !vm.bookmark.displayChildren }"
3535
ng-click="vm.utilitySvc.handleEvent(vm.clickBookmarkHeading, $event, vm.bookmark)" ng-if="vm.bookmark.title">
3636
{{ vm.bookmarkHelperSvc.getBookmarkTitleForDisplay(vm.bookmark) }}
@@ -48,7 +48,7 @@ <h4 class="bookmark-heading" ng-if="!vm.bookmark.title">
4848
</div>
4949
<button class="btn btn-icon btn-edit-bookmark"
5050
title="{{ vm.platformSvc.getI18nString(vm.Strings.Button.EditBookmark) }}"
51-
ng-if="vm.enableEditButton && vm.bookmark.url && !vm.bookmarkHelperSvc.isSeparator(vm.bookmark)"
51+
ng-if="vm.enableEditButton && vm.bookmark.url && !vm.isSeparator(vm.bookmark)"
5252
ng-click="vm.utilitySvc.handleEvent(vm.editBookmark(), $event, vm.bookmark)">
5353
<i class="fas fa-edit" aria-hidden="true"></i>
5454
<span class="sr-only">{{ vm.platformSvc.getI18nString(vm.Strings.Button.EditBookmark) }}</span>

src/modules/app/app-search/bookmark/bookmark.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, Input, Output } from 'angular-ts-decorators';
22
import autobind from 'autobind-decorator';
33
import BookmarkHelperService from '../../../shared/bookmark/bookmark-helper/bookmark-helper.service';
4+
import { BookmarkType } from '../../../shared/bookmark/bookmark.enum';
45
import { Bookmark } from '../../../shared/bookmark/bookmark.interface';
56
import { PlatformService } from '../../../shared/global-shared.interface';
67
import UtilityService from '../../../shared/utility/utility.service';
@@ -72,4 +73,8 @@ export default class BookmarkComponent {
7273
}
7374
}, 100);
7475
}
76+
77+
isSeparator(bookmark: BookmarkTreeItem): boolean {
78+
return this.bookmarkHelperSvc.getBookmarkType(bookmark) === BookmarkType.Separator;
79+
}
7580
}

0 commit comments

Comments
 (0)