mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Improve Squire toolbar
Cleanup some JS code
This commit is contained in:
parent
e52b9abc61
commit
0158a5fe1e
9 changed files with 163 additions and 200 deletions
|
|
@ -23,18 +23,13 @@ export function root(startupUrl = '') {
|
|||
return HASH_PREFIX + pString(startupUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function rootAdmin() {
|
||||
return Settings.app('adminHostUse') ? ROOT : SERVER_PREFIX + (Settings.app('adminPath') || 'admin');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function logoutLink() {
|
||||
return rl.adminArea() ? rootAdmin() : ROOT;
|
||||
return (rl.adminArea() && !Settings.app('adminHostUse'))
|
||||
? SERVER_PREFIX + (Settings.app('adminPath') || 'admin')
|
||||
: ROOT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
.squire-toolbar select {
|
||||
font-size: 12px;
|
||||
padding-left: 0;
|
||||
padding: 4px 1.5em 4px 6px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
width: 7em;
|
||||
|
|
@ -18,6 +18,9 @@
|
|||
.squire-toolbar select[data-action="fontSize"] {
|
||||
width: 5em;
|
||||
}
|
||||
.squire-toolbar button {
|
||||
font-family: snappymail, var(--fontSans)
|
||||
}
|
||||
.squire-toolbar button[data-action="bold"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import { decorateKoCommands, showScreenPopup } from 'Knoin/Knoin';
|
|||
import { AbstractViewCenter } from 'Knoin/AbstractViews';
|
||||
|
||||
import { Settings } from 'Common/Globals';
|
||||
import { rootAdmin } from 'Common/Links';
|
||||
|
||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||
|
||||
|
|
@ -161,8 +160,6 @@ class LoginUserView extends AbstractViewCenter {
|
|||
this.submitRequest(false);
|
||||
|
||||
setTimeout(() => this.querySelector('.inputAdditionalCode').focus(), 100);
|
||||
} else if (oData.Admin) {
|
||||
setTimeout(() => location.href = rootAdmin(), 100);
|
||||
} else {
|
||||
rl.route.reload();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue