mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Make layout fully responsive using matchMedia('(max-width: 799px)')
This commit is contained in:
parent
1dbd9bda0c
commit
e1833ae032
64 changed files with 239 additions and 434 deletions
41
dev/boot.js
41
dev/boot.js
|
|
@ -4,7 +4,6 @@ const
|
|||
qUri = path => doc.location.pathname.replace(/\/+$/,'') + '/?/' + path,
|
||||
eId = id => doc.getElementById('rl-'+id),
|
||||
admin = '1' == eId('app')?.dataset?.admin,
|
||||
layout = doc.cookie.match(/(^|;) ?rllayout=([^;]+)/) || '',
|
||||
|
||||
toggle = div => {
|
||||
eId('loading').hidden = true;
|
||||
|
|
@ -41,8 +40,6 @@ try {
|
|||
|
||||
let RL_APP_DATA = {};
|
||||
|
||||
doc.documentElement.classList.toggle('rl-mobile', 'mobile' === layout[2] || (!layout && 1000 > innerWidth));
|
||||
|
||||
window.rl = {
|
||||
adminArea: () => admin,
|
||||
|
||||
|
|
@ -109,27 +106,27 @@ window.rl = {
|
|||
init = Object.assign({ headers: {} }, init);
|
||||
init.headers.Accept = 'application/json';
|
||||
return rl.fetch(resource, init, postData).then(response => {
|
||||
if (!response.ok) {
|
||||
return Promise.reject('Network response error: ' + response.status);
|
||||
}
|
||||
/* TODO: use this for non-developers?
|
||||
response.clone()
|
||||
let data = response.text();
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// console.log(data);
|
||||
return Promise.reject(Notifications.JsonParse);
|
||||
return {
|
||||
Result: false,
|
||||
ErrorCode: 952, // Notifications.JsonParse
|
||||
ErrorMessage: e.message,
|
||||
ErrorMessageAdditional: data
|
||||
if (response.ok) {
|
||||
/* TODO: use this for non-developers?
|
||||
response.clone()
|
||||
let data = response.text();
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// console.log(data);
|
||||
return Promise.reject(Notifications.JsonParse);
|
||||
return {
|
||||
Result: false,
|
||||
ErrorCode: 952, // Notifications.JsonParse
|
||||
ErrorMessage: e.message,
|
||||
ErrorMessageAdditional: data
|
||||
}
|
||||
}
|
||||
*/
|
||||
return response.json();
|
||||
}
|
||||
*/
|
||||
return response.json();
|
||||
return Promise.reject('Network response error: ' + response.status);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue