calendar: cleanup
parent
4fcd9dba40
commit
7a6aa80f30
|
|
@ -236,7 +236,6 @@ const drawCalendar = function(date) {
|
||||||
|
|
||||||
const eventsThisDay = eventsThisMonthPerDay[curDay.getDate()];
|
const eventsThisDay = eventsThisMonthPerDay[curDay.getDate()];
|
||||||
if (eventsThisDay && eventsThisDay.length > 0) {
|
if (eventsThisDay && eventsThisDay.length > 0) {
|
||||||
eventsThisDay.sort((a,b) => a.date - b.date);
|
|
||||||
// Display events for this day
|
// Display events for this day
|
||||||
eventsThisDay.forEach((ev, idx) => {
|
eventsThisDay.forEach((ev, idx) => {
|
||||||
if (sameDay(ev.date, curDay)) {
|
if (sameDay(ev.date, curDay)) {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
(function (back) {
|
(function (back) {
|
||||||
var FILE = "calendar.json";
|
const FILE = "calendar.json";
|
||||||
const HOLIDAY_FILE = "calendar.days.json";
|
const HOLIDAY_FILE = "calendar.days.json";
|
||||||
var settings = require('Storage').readJSON(FILE, true) || {};
|
const settings = require('Storage').readJSON(FILE, true) || {};
|
||||||
if (settings.ndColors === undefined)
|
|
||||||
if (process.env.HWVERSION == 2) {
|
|
||||||
settings.ndColors = true;
|
|
||||||
} else {
|
|
||||||
settings.ndColors = false;
|
|
||||||
}
|
|
||||||
if (settings.ndColors === undefined) {
|
if (settings.ndColors === undefined) {
|
||||||
if (process.env.HWVERSION == 2) {
|
if (process.env.HWVERSION == 2) {
|
||||||
settings.ndColors = true;
|
settings.ndColors = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue