Browse Source

Test on tiny screens, set min window size to 300w 450h

master
Skylar Ittner 4 years ago
parent
commit
4cb1557520
  1. 6
      js/home.js
  2. 2
      main.js

6
js/home.js

@ -9,14 +9,14 @@ var loadedCardTypes = [];
var totalCardTypes = [];
var cardSettings = {
"qwikclock_punchinout": {"classes": "col-sm-12 col-md-4 col-lg-4 col-xl-4 order-1"},
"qwikclock_myshifts": {"classes": "col-sm-12 col-md-8 col-lg-8 col-xl-6 order-2"}
"qwikclock_punchinout": {"classes": "col-12 col-md-4 col-lg-4 col-xl-4 order-1"},
"qwikclock_myshifts": {"classes": "col-12 col-md-8 col-lg-8 col-xl-6 order-2"}
};
function loadCard(type, apiurl, title) {
$.get("cards/" + type + ".html", {}, function (html) {
console.log(type + " " + apiurl + " " + title);
var cardClasses = "col-sm-12 col-md-6 col-lg-6 col-xl-4 order-12";
var cardClasses = "col-12 col-md-6 col-lg-6 col-xl-4 order-12";
if (cardSettings.hasOwnProperty(type) && cardSettings[type].hasOwnProperty("classes")) {
cardClasses = cardSettings[type]["classes"];
}

2
main.js

@ -8,6 +8,6 @@
nw.Window.open('index.html', {
"id": "station_mainwindow"
}, function (win) {
win.setMinimumSize(640, 480);
win.setMinimumSize(300, 450);
win.setPosition("center");
});
Loading…
Cancel
Save