From de3172ee95cc4be67c358f31e338055469c3ad13 Mon Sep 17 00:00:00 2001 From: minermaniac447 <42500591+minermaniac447@users.noreply.github.com> Date: Wed, 8 Feb 2023 16:42:00 -0500 Subject: [PATCH] Add Page Display Options --- src/status/StatusBar.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/status/StatusBar.ts b/src/status/StatusBar.ts index 7d40bfc..3f458d0 100644 --- a/src/status/StatusBar.ts +++ b/src/status/StatusBar.ts @@ -107,6 +107,26 @@ export default class StatusBar { : 0)); break; } + } else if (metric.counter === MetricCounter.pages) { + switch (metric.type) { + case MetricType.file: + display = display + getPageCount(text, this.plugin.settings.pageWords); + break; + case MetricType.daily: + display = + display + + (this.plugin.settings.collectStats + ? this.plugin.statsManager.getDailyPages() + : 0); + break; + case MetricType.total: + display = + display + + (await (this.plugin.settings.collectStats + ? this.plugin.statsManager.getTotalPages() + : 0)); + break; + } } else if (metric.counter === MetricCounter.files) { switch (metric.type) { case MetricType.file: @@ -209,6 +229,26 @@ export default class StatusBar { : 0)); break; } + } else if (metric.counter === MetricCounter.pages) { + switch (metric.type) { + case MetricType.file: + display = display + 0; + break; + case MetricType.daily: + display = + display + + (this.plugin.settings.collectStats + ? this.plugin.statsManager.getDailyPages() + : 0); + break; + case MetricType.total: + display = + display + + (await (this.plugin.settings.collectStats + ? this.plugin.statsManager.getTotalPages() + : 0)); + break; + } } else if (metric.counter === MetricCounter.files) { switch (metric.type) { case MetricType.file: