mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved AbstractScreen properties
Improved settings screens Views: * sDefaultScope & sCurrentScope to sub-class keyScope * drop viewModelVisible * rename viewModelTemplateID to templateID * rename viewModelPosition to viewType
This commit is contained in:
parent
11f69ef9e4
commit
8be4c384bb
27 changed files with 136 additions and 196 deletions
|
|
@ -29,7 +29,7 @@ class PluginPopupView extends AbstractViewPopup {
|
|||
});
|
||||
|
||||
this.bDisabeCloseOnEsc = true;
|
||||
this.sDefaultScope = Scope.All;
|
||||
this.keyScope.scope = Scope.All;
|
||||
|
||||
this.tryToClosePopup = this.tryToClosePopup.debounce(200);
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ export class AbstractSystemDropDownUserView extends AbstractViewRight {
|
|||
|
||||
onBuild() {
|
||||
shortcuts.add('m,contextmenu', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
|
||||
if (this.viewModelVisible) {
|
||||
if (!this.viewModelDom.hidden) {
|
||||
MessageUserStore.messageFullScreenMode(false);
|
||||
this.accountMenuDropdownTrigger(true);
|
||||
return false;
|
||||
|
|
@ -97,7 +97,7 @@ export class AbstractSystemDropDownUserView extends AbstractViewRight {
|
|||
|
||||
// shortcuts help
|
||||
shortcuts.add('?,f1,help', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
|
||||
if (this.viewModelVisible) {
|
||||
if (!this.viewModelDom.hidden) {
|
||||
showScreenPopup(KeyboardShortcutsHelpPopupView);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
}
|
||||
|
||||
prefetchNextTick() {
|
||||
if (!this.bPrefetch && !ifvisible.now() && this.viewModelVisible) {
|
||||
if (!this.bPrefetch && !ifvisible.now() && !this.viewModelDom.hidden) {
|
||||
const message = MessageUserStore.list.find(
|
||||
item => item && !hasRequestedMessage(item.folder, item.uid)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
// exit fullscreen, back
|
||||
shortcuts.add('escape,backspace', '', Scope.MessageView, () => {
|
||||
if (this.viewModelVisible && MessageUserStore.message()) {
|
||||
if (!this.viewModelDom.hidden && MessageUserStore.message()) {
|
||||
const preview = SettingsUserStore.usePreviewPane();
|
||||
if (this.fullScreenMode()) {
|
||||
this.fullScreenMode(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue