mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Cleanup CSS and fix SquireUI css
This commit is contained in:
parent
39e9ecd4f2
commit
8b53b189f8
7 changed files with 33 additions and 38 deletions
10
dev/External/SquireUI.js
vendored
10
dev/External/SquireUI.js
vendored
|
|
@ -12,7 +12,7 @@ const doc = document,
|
|||
|
||||
i18n = (str, def) => rl.i18n(str) || def,
|
||||
|
||||
ctrlKey = /Mac OS X/.test( navigator.userAgent ) ? 'meta + ' : 'Ctrl + ',
|
||||
ctrlKey = /Mac OS X/.test( navigator.userAgent ) ? '⌘ + ' : 'Ctrl + ',
|
||||
|
||||
getFragmentOfChildren = parent => {
|
||||
let frag = doc.createDocumentFragment();
|
||||
|
|
@ -200,13 +200,13 @@ class SquireUI
|
|||
*/
|
||||
inline: {
|
||||
bold: {
|
||||
html: '𝐁',
|
||||
html: 'B',
|
||||
cmd: () => this.doAction('bold','B'),
|
||||
key: 'B',
|
||||
hint: 'Bold'
|
||||
},
|
||||
italic: {
|
||||
html: '𝐼',
|
||||
html: 'I',
|
||||
cmd: () => this.doAction('italic','I'),
|
||||
key: 'I',
|
||||
hint: 'Italic'
|
||||
|
|
@ -224,13 +224,13 @@ class SquireUI
|
|||
hint: 'Strikethrough'
|
||||
},
|
||||
sub: {
|
||||
html: 'S<sub>x</sub>',
|
||||
html: 'Xₙ',
|
||||
cmd: () => this.doAction('subscript','SUB'),
|
||||
key: 'Shift + 5',
|
||||
hint: 'Subscript'
|
||||
},
|
||||
sup: {
|
||||
html: 'S<sup>x</sup>',
|
||||
html: 'Xⁿ',
|
||||
cmd: () => this.doAction('superscript','SUP'),
|
||||
key: 'Shift + 6',
|
||||
hint: 'Superscript'
|
||||
|
|
|
|||
|
|
@ -34,6 +34,20 @@
|
|||
.squire-toolgroup select[data-action="fontSize"] {
|
||||
width: 4em;
|
||||
}
|
||||
.squire-toolgroup select[data-action="bold"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
.squire-toolgroup select[data-action="italic"] {
|
||||
font-style: italic;
|
||||
}
|
||||
/*
|
||||
.squire-toolgroup select[data-action="underline"] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.squire-toolgroup select[data-action="strikethrough"] {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
*/
|
||||
|
||||
.squire-wysiwyg {
|
||||
box-sizing: border-box;
|
||||
|
|
|
|||
|
|
@ -283,10 +283,6 @@ select {
|
|||
color: #555;
|
||||
}
|
||||
|
||||
html.no-rgba .modal {
|
||||
border-width: 0 !important;
|
||||
}
|
||||
|
||||
.modal.loginContent .modal-body, .modal.loginAdminContent .modal-body {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
|
|
|||
22
dev/boot.js
22
dev/boot.js
|
|
@ -3,8 +3,9 @@
|
|||
|
||||
const
|
||||
doc = document,
|
||||
html = doc.documentElement,
|
||||
app = doc.getElementById('rl-app'),
|
||||
eId = id => doc.getElementById(id),
|
||||
htmlCL = doc.documentElement.classList,
|
||||
app = eId('rl-app'),
|
||||
options = app && app.dataset.boot && JSON.parse(app.dataset.boot) || {},
|
||||
|
||||
Storage = type => {
|
||||
|
|
@ -41,8 +42,8 @@ const
|
|||
setTimestamp = () => storage().setItem(TIME_KEY, timestamp()),
|
||||
|
||||
showError = () => {
|
||||
doc.getElementById('rl-loading').hidden = true;
|
||||
doc.getElementById('rl-loading-error').hidden = false;
|
||||
eId('rl-loading').hidden = true;
|
||||
eId('rl-loading-error').hidden = false;
|
||||
p.end();
|
||||
},
|
||||
|
||||
|
|
@ -88,7 +89,7 @@ const
|
|||
};
|
||||
|
||||
if (!navigator || !navigator.cookieEnabled) {
|
||||
doc.location.replace('./?/NoCookie');
|
||||
doc.location.href = './?/NoCookie';
|
||||
}
|
||||
|
||||
let container = doc.querySelector('.progressjs'),
|
||||
|
|
@ -152,7 +153,7 @@ win.__initAppData = appData => {
|
|||
|
||||
if (appData) {
|
||||
if (appData.NewThemeLink) {
|
||||
doc.getElementById('app-theme-link').href = appData.NewThemeLink;
|
||||
eId('app-theme-link').href = appData.NewThemeLink;
|
||||
}
|
||||
|
||||
appData.IncludeCss && writeCSS(appData.IncludeCss);
|
||||
|
|
@ -160,7 +161,7 @@ win.__initAppData = appData => {
|
|||
if (appData.IncludeBackground) {
|
||||
const img = appData.IncludeBackground.replace('{{USER}}', rl.hash.get() || '0');
|
||||
if (img) {
|
||||
html.classList.add('UserBackground');
|
||||
htmlCL.add('UserBackground');
|
||||
doc.body.style.backgroundImage = "url("+img+")";
|
||||
}
|
||||
}
|
||||
|
|
@ -217,12 +218,9 @@ Storage('session');
|
|||
// init section
|
||||
setInterval(setTimestamp, 60000); // 1m
|
||||
|
||||
html.classList.add(options.mobileDevice ? 'mobile' : 'no-mobile');
|
||||
htmlCL.add(options.mobileDevice ? 'mobile' : 'no-mobile');
|
||||
|
||||
['app-css','app-theme-link'].forEach(css => {
|
||||
css = doc.getElementById(css);
|
||||
css.href = css.dataset.href;
|
||||
});
|
||||
['app-css','app-theme-link'].forEach(css => eId(css).href = css.dataset.href);
|
||||
|
||||
loadScript('./?/'
|
||||
+ (options.admin ? 'Admin' : '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue