From cb54753498a92c4480e16374accca4a229b952dc Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 15 Jul 2022 23:23:19 +0000 Subject: [PATCH] projects --- HELP.md | 8 +++++++- index.js | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/HELP.md b/HELP.md index ae6fa72..5c137f7 100644 --- a/HELP.md +++ b/HELP.md @@ -24,6 +24,10 @@ Companion only knows the ID of timers it has started, if a timer is started from Attempt to stop the current timer. This will fail if Companion doesn't know the ID of the currently running timer. +**Refresh Project List** + +Retrives the current list of projects from the toggl server. This action runs automatically when Companion starts and when the module is enabled. + ## Presets Presets are available for **Start Timer** and **Stop Timer**. The **Stop Timer** preset also includes both the **Get Current Timer** and **Stop Current Timer** actions to ensure reliable operation. @@ -37,4 +41,6 @@ First release Fix broken link ### Version 1.0.2 -Allow a project to be specified when starting a new timer button \ No newline at end of file +Allow a project to be specified when starting a new timer button + +Add action to refresh project list \ No newline at end of file diff --git a/index.js b/index.js index 3fe52de..dfc5fe6 100644 --- a/index.js +++ b/index.js @@ -150,6 +150,9 @@ instance.prototype.actions = function (system) { stopCurrentTimer: { label: 'Stop Current Timer', }, + refreshProjects: { + label: 'Refresh Project List', + }, }) } @@ -203,6 +206,10 @@ instance.prototype.action = function (action) { self.getCurrentTimer() break } + case 'refreshProjects': { + self.getWorkspace() + break + } default: break }