mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Bugfix boostrap alerts.less was accidentally removed
Bugfix Date.fromNow('past'/'future') reversed
Replace Events[pub/sub]('interval.*') with setInterval()
Events[pub/sub] to native
Cleanup knockout extensions
Replaced momentToNode with proper HTML5 <time>
Cleanup Momentor
This commit is contained in:
parent
6541a1de7c
commit
9f1ea1a0fd
44 changed files with 539 additions and 1126 deletions
|
|
@ -7,7 +7,6 @@ import MessageStore from 'Stores/User/Message';
|
|||
import { Capa, KeyState } from 'Common/Enums';
|
||||
import { settings } from 'Common/Links';
|
||||
|
||||
import * as Events from 'Common/Events';
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
|
@ -40,12 +39,12 @@ class AbstractSystemDropDownUserView extends AbstractViewNext {
|
|||
|
||||
this.addAccountClick = this.addAccountClick.bind(this);
|
||||
|
||||
Events.sub('audio.stop', () => AppStore.currentAudio(''));
|
||||
Events.sub('audio.start', (name) => AppStore.currentAudio(name));
|
||||
addEventListener('audio.stop', () => AppStore.currentAudio(''));
|
||||
addEventListener('audio.start', e => AppStore.currentAudio(e.detail));
|
||||
}
|
||||
|
||||
stopPlay() {
|
||||
Events.pub('audio.api.stop');
|
||||
dispatchEvent(new CustomEvent('audio.api.stop'));
|
||||
}
|
||||
|
||||
accountClick(account, event) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import { computedPagenatorHelper, draggablePlace, friendlySize } from 'Common/Ut
|
|||
|
||||
import { mailBox, append } from 'Common/Links';
|
||||
import { Selector } from 'Common/Selector';
|
||||
import * as Events from 'Common/Events';
|
||||
|
||||
import { i18n, initOnStartOrLangChange } from 'Common/Translator';
|
||||
|
||||
|
|
@ -238,15 +237,17 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
this.goToUpUpOrDownDown(v);
|
||||
});
|
||||
|
||||
Events.sub('mailbox.message-list.selector.go-down', (select) => {
|
||||
this.selector.goDown(select);
|
||||
addEventListener('mailbox.message-list.selector.go-down', e => {
|
||||
this.selector.goDown(e.detail);
|
||||
});
|
||||
|
||||
Events.sub('mailbox.message-list.selector.go-up', (select) => {
|
||||
this.selector.goUp(select);
|
||||
addEventListener('mailbox.message-list.selector.go-up', e => {
|
||||
this.selector.goUp(e.detail);
|
||||
});
|
||||
|
||||
Events.sub('mailbox.message.show', (sFolder, sUid) => {
|
||||
addEventListener('mailbox.message.show', e => {
|
||||
const sFolder = e.detail.Folder, sUid = e.detail.Uid;
|
||||
|
||||
const message = this.messageList().find(
|
||||
item => item && sFolder === item.folderFullNameRaw && sUid === item.uid
|
||||
);
|
||||
|
|
@ -781,7 +782,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
initShortcuts() {
|
||||
key('enter', KeyState.MessageList, () => {
|
||||
if (this.message() && this.useAutoSelect()) {
|
||||
Events.pub('mailbox.message-view.toggle-full-screen');
|
||||
dispatchEvent(new CustomEvent('mailbox.message-view.toggle-full-screen'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import {
|
|||
} from 'Common/Utils';
|
||||
|
||||
import Audio from 'Common/Audio';
|
||||
import * as Events from 'Common/Events';
|
||||
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { attachmentDownload } from 'Common/Links';
|
||||
|
|
@ -328,7 +327,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
() => MessageStore.messageListCompleteLoadingThrottle() || MessageStore.messageLoadingThrottle()
|
||||
);
|
||||
|
||||
Events.sub('mailbox.message-view.toggle-full-screen', () => {
|
||||
addEventListener('mailbox.message-view.toggle-full-screen', () => {
|
||||
this.toggleFullScreen();
|
||||
});
|
||||
|
||||
|
|
@ -350,12 +349,16 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
@command((self) => !self.messageListAndMessageViewLoading())
|
||||
goUpCommand() {
|
||||
Events.pub('mailbox.message-list.selector.go-up', [Layout.NoPreview === this.layout() ? !!this.message() : true]);
|
||||
dispatchEvent(new CustomEvent('mailbox.message-list.selector.go-up',
|
||||
{detail:Layout.NoPreview === this.layout() ? !!this.message() : true}
|
||||
));
|
||||
}
|
||||
|
||||
@command((self) => !self.messageListAndMessageViewLoading())
|
||||
goDownCommand() {
|
||||
Events.pub('mailbox.message-list.selector.go-down', [Layout.NoPreview === this.layout() ? !!this.message() : true]);
|
||||
dispatchEvent(new CustomEvent('mailbox.message-list.selector.go-up',
|
||||
{detail:Layout.NoPreview === this.layout() ? !!this.message() : true}
|
||||
));
|
||||
}
|
||||
|
||||
detectDomBackgroundColor(dom) {
|
||||
|
|
@ -537,8 +540,8 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
this.message.subscribe(fCheckHeaderHeight);
|
||||
|
||||
var t;
|
||||
Events.sub(
|
||||
'window.resize',
|
||||
addEventListener(
|
||||
'resize',
|
||||
()=>{
|
||||
// throttle
|
||||
if (!t) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue