fix: keep search options visible while authorizing
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
ng-click='self.clearFilterText();',
|
||||
ng-show='self.state.noteFilter.text'
|
||||
) ✕
|
||||
ng-if='self.state.searchIsFocused || self.state.searchOptionsAreFocused'
|
||||
label.sk-panel-row.justify-left.mt-2(
|
||||
ng-if='self.state.searchIsFocused || self.state.searchOptionsAreFocused || self.state.authorizingSearchOptions'
|
||||
style="padding-bottom: 0"
|
||||
)
|
||||
.sk-horizontal-group.tight
|
||||
|
||||
@@ -37,6 +37,7 @@ type NotesState = {
|
||||
}
|
||||
searchIsFocused: boolean;
|
||||
searchOptionsAreFocused: boolean;
|
||||
authorizingSearchOptions: boolean;
|
||||
mutable: { showMenu: boolean }
|
||||
completedFullSync: boolean
|
||||
[PrefKey.TagsPanelWidth]?: number
|
||||
@@ -139,7 +140,8 @@ class NotesViewCtrl extends PureViewCtrl<unknown, NotesState> {
|
||||
completedFullSync: false,
|
||||
hideTags: true,
|
||||
searchIsFocused: false,
|
||||
searchOptionsAreFocused: false
|
||||
searchOptionsAreFocused: false,
|
||||
authorizingSearchOptions: false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -166,9 +168,15 @@ class NotesViewCtrl extends PureViewCtrl<unknown, NotesState> {
|
||||
this.state.noteFilter.includeProtectedNoteText = false;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
this.setState({
|
||||
authorizingSearchOptions: true,
|
||||
});
|
||||
if (await this.application.authorizeSearchingProtectedNotesText()) {
|
||||
this.state.noteFilter.includeProtectedNoteText = true;
|
||||
}
|
||||
this.setState({
|
||||
authorizingSearchOptions: false,
|
||||
});
|
||||
}
|
||||
this.flushUI();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user