mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Improved mobile view
This commit is contained in:
parent
3bad2d5dbd
commit
6ae38bfe1b
5 changed files with 24 additions and 37 deletions
|
|
@ -401,6 +401,19 @@ showMessageComposer = (params = []) =>
|
||||||
rl.app.showMessageComposer(params);
|
rl.app.showMessageComposer(params);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
initFullscreen = (el, fn) =>
|
||||||
|
{
|
||||||
|
let event = 'fullscreenchange';
|
||||||
|
if (!el.requestFullscreen && el.webkitRequestFullscreen) {
|
||||||
|
el.requestFullscreen = el.webkitRequestFullscreen;
|
||||||
|
event = 'webkit'+event;
|
||||||
|
}
|
||||||
|
if (el.requestFullscreen) {
|
||||||
|
el.addEventListener(event, fn);
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
setLayoutResizer = (source, target, sClientSideKeyName, mode) =>
|
setLayoutResizer = (source, target, sClientSideKeyName, mode) =>
|
||||||
{
|
{
|
||||||
if (source.layoutResizer && source.layoutResizer.mode != mode) {
|
if (source.layoutResizer && source.layoutResizer.mode != mode) {
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,6 @@ html.list-loading body {
|
||||||
cursor: progress;
|
cursor: progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.rl-mobile) {
|
|
||||||
min-width: 700px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 1000px) {
|
@media screen and (min-width: 1000px) {
|
||||||
body {
|
body {
|
||||||
background-image: var(--main-bg-image);
|
background-image: var(--main-bg-image);
|
||||||
|
|
|
||||||
|
|
@ -178,12 +178,8 @@ Secondly, we can't rely on MUA's what to do with :empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rl-mobile #V-PopupsCompose,
|
|
||||||
.rl-mobile #V-PopupsIdentity {
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
|
||||||
.rl-mobile #V-PopupsCompose {
|
.rl-mobile #V-PopupsCompose {
|
||||||
min-height: calc(100% - 62px);
|
min-height: calc(100% - 12px);
|
||||||
}
|
}
|
||||||
|
|
||||||
#V-PopupsCompose[data-wysiwyg*=Forced] #squire-toolgroup-mode {
|
#V-PopupsCompose[data-wysiwyg*=Forced] #squire-toolgroup-mode {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import {
|
||||||
} from 'Common/EnumsUser';
|
} from 'Common/EnumsUser';
|
||||||
|
|
||||||
import { inFocus, pInt, isArray, arrayLength } from 'Common/Utils';
|
import { inFocus, pInt, isArray, arrayLength } from 'Common/Utils';
|
||||||
import { delegateRunOnDestroy } from 'Common/UtilsUser';
|
import { delegateRunOnDestroy, initFullscreen } from 'Common/UtilsUser';
|
||||||
import { encodeHtml, HtmlEditor } from 'Common/Html';
|
import { encodeHtml, HtmlEditor } from 'Common/Html';
|
||||||
|
|
||||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||||
|
|
@ -1243,21 +1243,13 @@ class ComposePopupView extends AbstractViewPopup {
|
||||||
|
|
||||||
// Fullscreen must be on app, else other popups fail
|
// Fullscreen must be on app, else other popups fail
|
||||||
const el = doc.getElementById('rl-app');
|
const el = doc.getElementById('rl-app');
|
||||||
let event = 'fullscreenchange';
|
this.oContent = initFullscreen(el, () =>
|
||||||
if (!el.requestFullscreen && el.webkitRequestFullscreen) {
|
|
||||||
el.requestFullscreen = el.webkitRequestFullscreen;
|
|
||||||
event = 'webkit' + event;
|
|
||||||
}
|
|
||||||
if (el.requestFullscreen) {
|
|
||||||
this.oContent = el;
|
|
||||||
el.addEventListener(event, () =>
|
|
||||||
ThemeStore.isMobile()
|
ThemeStore.isMobile()
|
||||||
&& this.modalVisibility()
|
&& this.modalVisibility()
|
||||||
&& (getFullscreenElement() !== el)
|
&& (getFullscreenElement() !== el)
|
||||||
&& this.skipCommand()
|
&& this.skipCommand()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} id
|
* @param {string} id
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import {
|
||||||
import { $htmlCL, leftPanelDisabled, keyScopeReal, moveAction, Settings, getFullscreenElement, exitFullscreen } from 'Common/Globals';
|
import { $htmlCL, leftPanelDisabled, keyScopeReal, moveAction, Settings, getFullscreenElement, exitFullscreen } from 'Common/Globals';
|
||||||
|
|
||||||
import { arrayLength, inFocus } from 'Common/Utils';
|
import { arrayLength, inFocus } from 'Common/Utils';
|
||||||
import { mailToHelper, showMessageComposer } from 'Common/UtilsUser';
|
import { mailToHelper, showMessageComposer, initFullscreen } from 'Common/UtilsUser';
|
||||||
|
|
||||||
import { SMAudio } from 'Common/Audio';
|
import { SMAudio } from 'Common/Audio';
|
||||||
|
|
||||||
|
|
@ -307,18 +307,8 @@ export class MailMessageView extends AbstractViewRight {
|
||||||
|
|
||||||
this.showFullInfo.subscribe(value => Local.set(ClientSideKeyName.MessageHeaderFullInfo, value ? '1' : '0'));
|
this.showFullInfo.subscribe(value => Local.set(ClientSideKeyName.MessageHeaderFullInfo, value ? '1' : '0'));
|
||||||
|
|
||||||
let event = 'fullscreenchange',
|
const el = dom.querySelector('.b-content');
|
||||||
el = dom.querySelector('.b-content');
|
this.oContent = initFullscreen(el, () => this.fullScreenMode(getFullscreenElement() === el));
|
||||||
if (!el.requestFullscreen && el.webkitRequestFullscreen) {
|
|
||||||
el.requestFullscreen = el.webkitRequestFullscreen;
|
|
||||||
event = 'webkit'+event;
|
|
||||||
}
|
|
||||||
if (el.requestFullscreen) {
|
|
||||||
this.oContent = el;
|
|
||||||
el.addEventListener(event, () =>
|
|
||||||
this.fullScreenMode(getFullscreenElement() === el)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const eqs = (ev, s) => ev.target.closestWithin(s, dom);
|
const eqs = (ev, s) => ev.target.closestWithin(s, dom);
|
||||||
dom.addEventListener('click', event => {
|
dom.addEventListener('click', event => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue