mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Replace viewDecorator and popupDecorator with proper AbstractView classes
This commit is contained in:
parent
51958babba
commit
864da66b5f
38 changed files with 202 additions and 359 deletions
|
|
@ -6,13 +6,13 @@ import { Capa, KeyState } from 'Common/Enums';
|
|||
import { settings } from 'Common/Links';
|
||||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
export class AbstractSystemDropDownUserView extends AbstractViewNext {
|
||||
constructor() {
|
||||
super();
|
||||
export class AbstractSystemDropDownUserView extends AbstractViewRight {
|
||||
constructor(name) {
|
||||
super(name, 'SystemDropDown');
|
||||
|
||||
this.mobile = !!Settings.app('mobile');
|
||||
this.mobileDevice = !!Settings.app('mobileDevice');
|
||||
|
|
|
|||
|
|
@ -19,21 +19,16 @@ import * as Local from 'Storage/Client';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { view, command, ViewType, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { command, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewCenter } from 'Knoin/AbstractViews';
|
||||
|
||||
import { rootAdmin } from 'Common/Links';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
@view({
|
||||
name: ['View/App/Login', 'View/User/Login'],
|
||||
type: ViewType.Center,
|
||||
templateID: 'Login'
|
||||
})
|
||||
class LoginUserView extends AbstractViewNext {
|
||||
class LoginUserView extends AbstractViewCenter {
|
||||
constructor() {
|
||||
super();
|
||||
super('User/Login', 'Login');
|
||||
|
||||
this.hideSubmitButton = Settings.app('hideSubmitButton');
|
||||
|
||||
|
|
|
|||
|
|
@ -10,19 +10,14 @@ import SettingsStore from 'Stores/User/Settings';
|
|||
import FolderStore from 'Stores/User/Folder';
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import { view, ViewType, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewLeft } from 'Knoin/AbstractViews';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
@view({
|
||||
name: 'View/User/MailBox/FolderList',
|
||||
type: ViewType.Left,
|
||||
templateID: 'MailFolderList'
|
||||
})
|
||||
class FolderListMailBoxUserView extends AbstractViewNext {
|
||||
class FolderListMailBoxUserView extends AbstractViewLeft {
|
||||
constructor() {
|
||||
super();
|
||||
super('User/MailBox/FolderList', 'MailFolderList');
|
||||
|
||||
this.oContentScrollable = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,22 +38,17 @@ import MessageStore from 'Stores/User/Message';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { view, command, ViewType, showScreenPopup, popupVisibility } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { command, showScreenPopup, popupVisibility } from 'Knoin/Knoin';
|
||||
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
||||
|
||||
const
|
||||
Settings = rl.settings,
|
||||
canBeMovedHelper = (self) => self.canBeMoved(),
|
||||
ifvisible = window.ifvisible;
|
||||
|
||||
@view({
|
||||
name: 'View/User/MailBox/MessageList',
|
||||
type: ViewType.Right,
|
||||
templateID: 'MailMessageList'
|
||||
})
|
||||
class MessageListMailBoxUserView extends AbstractViewNext {
|
||||
class MessageListMailBoxUserView extends AbstractViewRight {
|
||||
constructor() {
|
||||
super();
|
||||
super('User/MailBox/MessageList', 'MailMessageList');
|
||||
|
||||
this.sLastUid = null;
|
||||
this.bPrefetch = false;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ import * as Local from 'Storage/Client';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { view, command, ViewType, showScreenPopup, createCommand } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { command, showScreenPopup, createCommand } from 'Knoin/Knoin';
|
||||
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
|
|
@ -44,14 +44,9 @@ function isTransparent(color) {
|
|||
return 'rgba(0, 0, 0, 0)' === color || 'transparent' === color;
|
||||
}
|
||||
|
||||
@view({
|
||||
name: 'View/User/MailBox/MessageView',
|
||||
type: ViewType.Right,
|
||||
templateID: 'MailMessageView'
|
||||
})
|
||||
class MessageViewMailBoxUserView extends AbstractViewNext {
|
||||
class MessageViewMailBoxUserView extends AbstractViewRight {
|
||||
constructor() {
|
||||
super();
|
||||
super('User/MailBox/MessageView', 'MailMessageView');
|
||||
|
||||
const createCommandReplyHelper = type =>
|
||||
createCommand(() => {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
import { view, ViewType } from 'Knoin/Knoin';
|
||||
import { AbstractSystemDropDownUserView } from 'View/User/AbstractSystemDropDown';
|
||||
|
||||
@view({
|
||||
name: 'View/User/MailBox/SystemDropDown',
|
||||
type: ViewType.Right,
|
||||
templateID: 'SystemDropDown'
|
||||
})
|
||||
class SystemDropDownMailBoxUserView extends AbstractSystemDropDownUserView {}
|
||||
class SystemDropDownMailBoxUserView extends AbstractSystemDropDownUserView
|
||||
{
|
||||
constructor() {
|
||||
super('User/MailBox/SystemDropDown');
|
||||
}
|
||||
}
|
||||
|
||||
export { SystemDropDownMailBoxUserView };
|
||||
|
|
|
|||
|
|
@ -3,20 +3,15 @@ import { leftPanelDisabled } from 'Common/Globals';
|
|||
import { settings, inbox } from 'Common/Links';
|
||||
import { getFolderInboxName } from 'Common/Cache';
|
||||
|
||||
import { view, ViewType, settingsMenuKeysHandler } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { settingsMenuKeysHandler } from 'Knoin/Knoin';
|
||||
import { AbstractViewLeft } from 'Knoin/AbstractViews';
|
||||
|
||||
@view({
|
||||
name: 'View/User/Settings/Menu',
|
||||
type: ViewType.Left,
|
||||
templateID: 'SettingsMenu'
|
||||
})
|
||||
class MenuSettingsUserView extends AbstractViewNext {
|
||||
class MenuSettingsUserView extends AbstractViewLeft {
|
||||
/**
|
||||
* @param {Object} screen
|
||||
*/
|
||||
constructor(screen) {
|
||||
super();
|
||||
super('User/Settings/Menu', 'SettingsMenu');
|
||||
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,17 +4,11 @@ import { leftPanelDisabled } from 'Common/Globals';
|
|||
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import { view, ViewType } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
||||
|
||||
@view({
|
||||
name: 'View/User/Settings/Pane',
|
||||
type: ViewType.Right,
|
||||
templateID: 'SettingsPane'
|
||||
})
|
||||
class PaneSettingsUserView extends AbstractViewNext {
|
||||
class PaneSettingsUserView extends AbstractViewRight {
|
||||
constructor() {
|
||||
super();
|
||||
super('User/Settings/Pane', 'SettingsPane');
|
||||
|
||||
this.mobile = rl.settings.app('mobile');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
import { view, ViewType } from 'Knoin/Knoin';
|
||||
import { AbstractSystemDropDownUserView } from 'View/User/AbstractSystemDropDown';
|
||||
|
||||
@view({
|
||||
name: 'View/User/Settings/SystemDropDown',
|
||||
type: ViewType.Right,
|
||||
templateID: 'SystemDropDown'
|
||||
})
|
||||
class SystemDropDownSettingsUserView extends AbstractSystemDropDownUserView {}
|
||||
class SystemDropDownSettingsUserView extends AbstractSystemDropDownUserView
|
||||
{
|
||||
constructor() {
|
||||
super('User/Settings/SystemDropDown');
|
||||
}
|
||||
}
|
||||
|
||||
export { SystemDropDownSettingsUserView };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue