Removed simplestatemanager, use @media queries

This commit is contained in:
djmaze 2020-09-20 12:33:33 +02:00
parent 6bffc452b0
commit e1d3a143f4
9 changed files with 19 additions and 57 deletions

View file

@ -28,8 +28,6 @@ module.exports = {
'SquireUI': "readonly", 'SquireUI': "readonly",
// node_modules/knockout but dev/External/ko.js is used // node_modules/knockout but dev/External/ko.js is used
// 'ko': "readonly", // 'ko': "readonly",
// node_modules/simplestatemanager
'ssm': "readonly",
// vendors/routes/ // vendors/routes/
'hasher': "readonly", 'hasher': "readonly",
'signals': "readonly", 'signals': "readonly",

View file

@ -110,43 +110,10 @@ class AbstractApp {
initOnStartOrLangChange(initNotificationLanguage); initOnStartOrLangChange(initNotificationLanguage);
if (!mobile) { if (!mobile) {
$htmlCL.add('rl-desktop'); // mobile
window.addEventListener('resize', () => leftPanelDisabled(767 >= window.innerWidth));
ssm.addState({
id: 'mobile',
query: '(max-width: 767px)',
onEnter: () => {
$htmlCL.add('ssm-state-mobile');
leftPanelDisabled(true);
},
onLeave: () => {
$htmlCL.remove('ssm-state-mobile');
leftPanelDisabled(false);
}
});
ssm.addState({
id: 'tablet',
query: '(min-width: 768px) and (max-width: 999px)',
onEnter: () => $htmlCL.add('ssm-state-tablet'),
onLeave: () => $htmlCL.remove('ssm-state-tablet')
});
ssm.addState({
id: 'desktop',
query: '(min-width: 1000px) and (max-width: 1400px)',
onEnter: () => $htmlCL.add('ssm-state-desktop'),
onLeave: () => $htmlCL.remove('ssm-state-desktop')
});
ssm.addState({
id: 'desktop-large',
query: '(min-width: 1401px)',
onEnter: () => $htmlCL.add('ssm-state-desktop-large'),
onLeave: () => $htmlCL.remove('ssm-state-desktop-large')
});
} else { } else {
$htmlCL.add('ssm-state-mobile', 'rl-mobile'); $htmlCL.add('rl-mobile');
leftPanelDisabled(true); leftPanelDisabled(true);
} }

View file

@ -188,8 +188,8 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer,
// -webkit-overflow-scrolling: touch; // -webkit-overflow-scrolling: touch;
} }
html.ssm-state-desktop-large { /* desktop-large */
@media screen and (min-width: 1401px) {
#rl-left { #rl-left {
width: @rlLeftWidth + 20; width: @rlLeftWidth + 20;
} }
@ -211,8 +211,8 @@ html.ssm-state-desktop-large {
} }
} }
html.ssm-state-desktop { /* desktop */
@media screen and (min-width: 1000px) and (max-width: 1400px) {
#rl-left { #rl-left {
width: @rlLeftWidth; width: @rlLeftWidth;
} }
@ -234,8 +234,8 @@ html.ssm-state-desktop {
} }
} }
html.ssm-state-tablet, html.ssm-state-mobile { /* mobile and tablet */
@media screen and (max-width: 999px) {
#rl-left { #rl-left {
width: 155px; width: 155px;
} }
@ -267,8 +267,8 @@ html.ssm-state-tablet, html.ssm-state-mobile {
} }
} }
html.ssm-state-tablet { /* tablet */
@media screen and (min-width: 768px) and (max-width: 999px) {
.b-contacts-content.modal { .b-contacts-content.modal {
width: 800px; width: 800px;
} }

View file

@ -608,7 +608,8 @@ html.rl-no-preview-pane {
} }
} }
html.ssm-state-desktop-large { /* desktop-large */
@media screen and (min-width: 1401px) {
.messageList .b-content .messageListItem { .messageList .b-content .messageListItem {
font-size: 13px; font-size: 13px;
.dateParent { .dateParent {

View file

@ -651,7 +651,7 @@ html .messageItem {
} }
} }
html.rl-desktop .messageItem { html:not(.rl-mobile) .messageItem {
.buttonUp, .buttonFull { .buttonUp, .buttonFull {
display: none !important; display: none !important;
} }

View file

@ -129,8 +129,11 @@
} }
} }
html.ssm-state-mobile .accountPlace { /* mobile */
max-width: 150px !important; @media screen and (max-width: 767px) {
.accountPlace {
max-width: 150px !important;
}
} }
@keyframes firstBar { @keyframes firstBar {

View file

@ -91,7 +91,6 @@
"prettier": "1.19.1", "prettier": "1.19.1",
"raw-loader": "4.0.0", "raw-loader": "4.0.0",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"simplestatemanager": "4.1.1",
"style-loader": "1.1.3" "style-loader": "1.1.3"
}, },
"dependencies": { "dependencies": {

View file

@ -89,7 +89,6 @@ config.paths.js = {
'vendors/bootstrap/js/bootstrap.native.min.js', // fixed 'vendors/bootstrap/js/bootstrap.native.min.js', // fixed
'vendors/knockout/build/output/knockout-latest.js', 'vendors/knockout/build/output/knockout-latest.js',
'vendors/knockout-sortable/build/knockout-sortable.min.js ', 'vendors/knockout-sortable/build/knockout-sortable.min.js ',
'node_modules/simplestatemanager/dist/ssm.min.js',
'vendors/lightgallery/dist/js/lightgallery.min.js', // license 'vendors/lightgallery/dist/js/lightgallery.min.js', // license
'vendors/lightgallery/dist/js/lg-fullscreen.min.js', 'vendors/lightgallery/dist/js/lg-fullscreen.min.js',
'vendors/lightgallery/dist/js/lg-thumbnail.min.js', 'vendors/lightgallery/dist/js/lg-thumbnail.min.js',

View file

@ -5883,11 +5883,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
simplestatemanager@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/simplestatemanager/-/simplestatemanager-4.1.1.tgz#723879947cd8a40dd20645a0ee6a7cadcc669d4f"
integrity sha512-RRhB4rPEU10dwERLLrOTx3rdKW6sLHTsYpr+SBKoh/Vl4XETgNnux45+wgX59M1cDiJQX/CuMVu0eOWFSDECDg==
slash@^1.0.0: slash@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"