feat: search options (#540)

* feat: search options

* feat: sanitize folder names

* fix: add cursor: pointer to switch

* fix: explicitly make the search bar a text input

* refactor: remove magic number

* refactor: extract Switch component to its own file

* refactor: split AppState into multiple files

* refactor: review comments
This commit is contained in:
Baptiste Grob
2021-04-06 16:48:25 +02:00
committed by GitHub
parent 275c8cbd1f
commit ed69680295
24 changed files with 672 additions and 319 deletions

View File

@@ -12,6 +12,7 @@
i.icon.ion-plus.add-button
.filter-section(role='search')
input#search-bar.filter-bar(
type="text"
ng-ref='self.searchBarInput'
ng-focus='self.onSearchInputFocus()'
ng-blur='self.onSearchInputBlur()',
@@ -25,21 +26,12 @@
#search-clear-button(
ng-click='self.clearFilterText();',
ng-show='self.state.noteFilter.text'
aria-role="button"
) ✕
label.sk-panel-row.justify-left.mt-2.animate-slide-in-top(
ng-if='self.state.searchIsFocused || self.state.searchOptionsAreFocused || self.state.authorizingSearchOptions'
style="padding-bottom: 0"
)
.sk-horizontal-group.tight
input(
ng-ref='self.searchOptionsInput'
ng-focus="self.onSearchOptionsFocus()"
ng-blur="self.onSearchOptionsBlur()"
type="checkbox"
ng-checked="self.state.noteFilter.includeProtectedNoteText"
ng-on-click="self.onIncludeProtectedNoteTextChange($event)"
)
p.sk-p.capitalize Include protected contents
search-options(
class="ml-2 h-20px"
app-state='self.appState'
)
no-account-warning(
application='self.application'
app-state='self.appState'