mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +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);
|
||||
},
|
||||
|
||||
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) =>
|
||||
{
|
||||
if (source.layoutResizer && source.layoutResizer.mode != mode) {
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@ html.list-loading body {
|
|||
cursor: progress;
|
||||
}
|
||||
|
||||
html:not(.rl-mobile) {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1000px) {
|
||||
body {
|
||||
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 {
|
||||
min-height: calc(100% - 62px);
|
||||
min-height: calc(100% - 12px);
|
||||
}
|
||||
|
||||
#V-PopupsCompose[data-wysiwyg*=Forced] #squire-toolgroup-mode {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import {
|
|||
} from 'Common/EnumsUser';
|
||||
|
||||
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 { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
|
|
@ -1243,20 +1243,12 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
|
||||
// Fullscreen must be on app, else other popups fail
|
||||
const el = doc.getElementById('rl-app');
|
||||
let event = 'fullscreenchange';
|
||||
if (!el.requestFullscreen && el.webkitRequestFullscreen) {
|
||||
el.requestFullscreen = el.webkitRequestFullscreen;
|
||||
event = 'webkit' + event;
|
||||
}
|
||||
if (el.requestFullscreen) {
|
||||
this.oContent = el;
|
||||
el.addEventListener(event, () =>
|
||||
ThemeStore.isMobile()
|
||||
&& this.modalVisibility()
|
||||
&& (getFullscreenElement() !== el)
|
||||
&& this.skipCommand()
|
||||
);
|
||||
}
|
||||
this.oContent = initFullscreen(el, () =>
|
||||
ThemeStore.isMobile()
|
||||
&& this.modalVisibility()
|
||||
&& (getFullscreenElement() !== el)
|
||||
&& this.skipCommand()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import {
|
|||
import { $htmlCL, leftPanelDisabled, keyScopeReal, moveAction, Settings, getFullscreenElement, exitFullscreen } from 'Common/Globals';
|
||||
|
||||
import { arrayLength, inFocus } from 'Common/Utils';
|
||||
import { mailToHelper, showMessageComposer } from 'Common/UtilsUser';
|
||||
import { mailToHelper, showMessageComposer, initFullscreen } from 'Common/UtilsUser';
|
||||
|
||||
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'));
|
||||
|
||||
let event = 'fullscreenchange',
|
||||
el = dom.querySelector('.b-content');
|
||||
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 el = dom.querySelector('.b-content');
|
||||
this.oContent = initFullscreen(el, () => this.fullScreenMode(getFullscreenElement() === el));
|
||||
|
||||
const eqs = (ev, s) => ev.target.closestWithin(s, dom);
|
||||
dom.addEventListener('click', event => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue