mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Cleanup CSS and drop bMobileDevice detection.
Touch devices can be any size and can use (bluetooth/usb-c mouse/keyboard) these days. It's all about pixels and currently if the mode is mobile/no-mobile (this can be improved later).
This commit is contained in:
parent
25b4c899d0
commit
efcefbaf78
60 changed files with 233 additions and 379 deletions
|
|
@ -26,7 +26,6 @@ import { format as momentorFormat } from 'Common/Momentor';
|
|||
import { getMessageFlagsFromCache, setMessageFlagsToCache, setFolderHash } from 'Common/Cache';
|
||||
|
||||
import { HtmlEditor } from 'Common/HtmlEditor';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
|
||||
import AppStore from 'Stores/User/App';
|
||||
import SettingsStore from 'Stores/User/Settings';
|
||||
|
|
@ -1080,17 +1079,16 @@ class ComposePopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
setFocusInPopup() {
|
||||
if (!bMobileDevice) {
|
||||
setTimeout(() => {
|
||||
if (!this.to()) {
|
||||
this.to.focused(true);
|
||||
} else if (this.oEditor) {
|
||||
if (!this.to.focused()) {
|
||||
this.oEditor.focus();
|
||||
}
|
||||
// rl.settings.app('mobile') ||
|
||||
setTimeout(() => {
|
||||
if (!this.to()) {
|
||||
this.to.focused(true);
|
||||
} else if (this.oEditor) {
|
||||
if (!this.to.focused()) {
|
||||
this.oEditor.focus();
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
tryToClosePopup() {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import {
|
|||
} from 'Common/Utils';
|
||||
|
||||
import { CONTACTS_PER_PAGE } from 'Common/Consts';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
|
||||
import { Selector } from 'Common/Selector';
|
||||
import { exportContactsVcf, exportContactsCsv, uploadContacts } from 'Common/Links';
|
||||
|
|
@ -58,7 +57,6 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
|
||||
this.allowContactsSync = ContactStore.allowContactsSync;
|
||||
this.enableContactsSync = ContactStore.enableContactsSync;
|
||||
this.allowExport = !bMobileDevice;
|
||||
|
||||
this.search = ko.observable('');
|
||||
this.contactsCount = ko.observable(0);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { FiltersAction, FilterConditionField, FilterConditionType } from 'Common/Enums';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
import { defautOptionsAfterRender } from 'Common/Utils';
|
||||
import { i18n, initOnStartOrLangChange } from 'Common/Translator';
|
||||
|
||||
|
|
@ -163,7 +162,7 @@ class FilterPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
if (this.isNew() && this.filter() && !bMobileDevice) {
|
||||
if (this.isNew() && this.filter()/* && !rl.settings.app('mobile')*/) {
|
||||
this.filter().name.focused(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import ko from 'ko';
|
|||
|
||||
import { Notification } from 'Common/Enums';
|
||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
import { defautOptionsAfterRender, folderListOptionsBuilder } from 'Common/Utils';
|
||||
|
||||
import FolderStore from 'Stores/User/Folder';
|
||||
|
|
@ -74,9 +73,8 @@ class FolderCreateView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
if (!bMobileDevice) {
|
||||
this.folderName.focused(true);
|
||||
}
|
||||
// rl.settings.app('mobile') ||
|
||||
this.folderName.focused(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
import { fakeMd5 } from 'Common/Utils';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
|
|
@ -164,7 +163,7 @@ class IdentityPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
if (!this.owner() && !bMobileDevice) {
|
||||
if (!this.owner()/* && !rl.settings.app('mobile')*/) {
|
||||
this.email.focused(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { StorageResultType } from 'Common/Enums';
|
||||
import { bMobileDevice } from 'Common/Globals';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
|
|
@ -54,9 +53,8 @@ class TwoFactorTestPopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
if (!bMobileDevice) {
|
||||
this.code.focused(true);
|
||||
}
|
||||
// rl.settings.app('mobile') ||
|
||||
this.code.focused(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import {
|
|||
|
||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
|
||||
import { bMobileDevice, leftPanelDisabled, moveAction } from 'Common/Globals';
|
||||
import { leftPanelDisabled, moveAction } from 'Common/Globals';
|
||||
|
||||
import { computedPagenatorHelper, friendlySize } from 'Common/Utils';
|
||||
|
||||
|
|
@ -736,7 +736,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
this.initUploaderForAppend();
|
||||
this.initShortcuts();
|
||||
|
||||
if (!bMobileDevice && ifvisible && Settings.capa(Capa.Prefetch)) {
|
||||
if (ifvisible && !rl.settings.app('mobile') && Settings.capa(Capa.Prefetch)) {
|
||||
ifvisible.idle(this.prefetchNextTick.bind(this));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue