From b793e7d6e460fb8e1ff232208220a886779079c5 Mon Sep 17 00:00:00 2001 From: Alessandro Cocco Date: Wed, 8 Jun 2022 21:03:39 +0200 Subject: [PATCH] [Nifty-A Clock] Read settings file via ClockFace --- apps/ffcniftya/app.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/ffcniftya/app.js b/apps/ffcniftya/app.js index 24d26622c..2c1a54f6e 100644 --- a/apps/ffcniftya/app.js +++ b/apps/ffcniftya/app.js @@ -33,8 +33,6 @@ const clock = new ClockFace({ this.scale = g.getWidth() / this.viewport.width; this.centerTimeScaleX = this.center.x + 32 * this.scale; this.centerDatesScaleX = this.center.x + 40 * this.scale; - - this.showWeekNum = Object.assign({ showWeekNum: true }, require("Storage").readJSON("ffcniftya.json", true))["showWeekNum"]; }, draw: function (date) { const hour = date.getHours() - (this.is12Hour && date.getHours() > 12 ? 12 : 0); @@ -55,6 +53,7 @@ const clock = new ClockFace({ if (this.showWeekNum) g.drawString(format(ISO8601_week_no(date)), this.centerDatesScaleX, this.center.y + 15 * this.scale); g.drawString(monthName, this.centerDatesScaleX, this.center.y + 48 * this.scale); g.drawString(dayName, this.centerDatesScaleX, this.center.y + 66 * this.scale); - } + }, + settingsFile: "ffcniftya.json" }); clock.start(); \ No newline at end of file