mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Converted *Ajax into *Fetch (because we use the Fetch API, not jQuery.ajax)
This commit is contained in:
parent
bb4d66d6d2
commit
29cf711a6a
52 changed files with 399 additions and 540 deletions
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { view, command, ViewType, routeOff, routeReload } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import DomainStore from 'Stores/Admin/Domain';
|
||||
import PluginStore from 'Stores/Admin/Plugin';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import FolderStore from 'Stores/User/Folder';
|
|||
import PgpStore from 'Stores/User/Pgp';
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import { i18n, getNotification } from 'Common/Translator';
|
|||
import SettingsStore from 'Stores/User/Settings';
|
||||
import ContactStore from 'Stores/User/Contact';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { EmailModel } from 'Model/Email';
|
||||
import { ContactModel } from 'Model/Contact';
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { i18n } from 'Common/Translator';
|
|||
|
||||
import CapaAdminStore from 'Stores/Admin/Capa';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/Admin';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { i18n } from 'Common/Translator';
|
|||
|
||||
import DomainStore from 'Stores/Admin/Domain';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/Admin';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { setFolderHash } from 'Common/Cache';
|
|||
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { defautOptionsAfterRender, folderListOptionsBuilder } from 'Common/Utils
|
|||
|
||||
import FolderStore from 'Stores/User/Folder';
|
||||
|
||||
import Promises from 'Promises/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ class FolderCreateView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
getApp().foldersPromisesActionHelper(
|
||||
Promises.folderCreate(this.folderName(), parentFolderName, FolderStore.foldersCreating),
|
||||
Remote.folderCreate(this.folderName(), parentFolderName, FolderStore.foldersCreating),
|
||||
Notification.CantCreateFolder
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { initOnStartOrLangChange, i18n } from 'Common/Translator';
|
|||
|
||||
import FolderStore from 'Stores/User/Folder';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { popup } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { bMobileDevice } from 'Common/Globals';
|
|||
import { fakeMd5 } from 'Common/Utils';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import { KeyState, StorageResultType, Notification } from 'Common/Enums';
|
||||
import { getNotification, i18n } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import Remote from 'Remote/Admin/Fetch';
|
||||
|
||||
import { popup, command, isPopupVisible, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { StorageResultType, Notification } from 'Common/Enums';
|
|||
import { getNotification } from 'Common/Translator';
|
||||
import { HtmlEditor } from 'Common/HtmlEditor';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { Capa, StorageResultType } from 'Common/Enums';
|
|||
import { pString } from 'Common/Utils';
|
||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import { StorageResultType } from 'Common/Enums';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { popup, command } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import LanguageStore from 'Stores/Language';
|
|||
|
||||
import * as Local from 'Storage/Client';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { view, command, ViewType, routeOff, showScreenPopup, routeReload } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import SettingsStore from 'Stores/User/Settings';
|
|||
import FolderStore from 'Stores/User/Folder';
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ import MessageStore from 'Stores/User/Message';
|
|||
|
||||
import * as Local from 'Storage/Client';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Promises from 'Promises/User/Ajax';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
|
|
@ -781,7 +780,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
downloadAsZip() {
|
||||
const hashes = this.getAttachmentsHashes();
|
||||
if (hashes.length) {
|
||||
Promises.attachmentsActions('Zip', hashes, this.downloadAsZipLoading)
|
||||
Remote.attachmentsActions('Zip', hashes, this.downloadAsZipLoading)
|
||||
.then((result) => {
|
||||
if (result && result.Result && result.Result.Files && result.Result.Files[0] && result.Result.Files[0].Hash) {
|
||||
getApp().download(attachmentDownload(result.Result.Files[0].Hash));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue