FIX: bootstap browser screen detect

This commit is contained in:
Tony Air 2020-02-08 03:13:38 +07:00
parent 41de30c432
commit b1484f66f7
4 changed files with 9 additions and 7 deletions

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/app.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
"version": "1.7.4",
"version": "1.7.5",
"author": "Tony Air <tony@twma.pro>",
"license": "MIT",
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",

View File

@ -253,12 +253,14 @@ const MainUI = (($) => {
static detectBootstrapScreenSize() {
const $el = $('<div class="env-test"></div>');
const envs = [...Consts.ENVS];
let envs = [...Consts.ENVS];
$Body.append($el);
let curEnv = envs.shift();
for (const env of envs.reverse()) {
let curEnv = envs.shift();
envs = envs.reverse();
for (let i = 0; i < envs.length; ++i) {
const env = envs[i];
$el.addClass(`d-${env}-none`);
if ($el.is(':hidden')) {
curEnv = env;