@stratusagent/dashboard 0.13.7 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stratusagent/dashboard",
3
- "version": "0.13.7",
3
+ "version": "0.14.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -285,7 +285,7 @@ export const renderSettings = (section) => {
285
285
  const save = async () => {
286
286
  state.busy = true; update();
287
287
  try {
288
- await api.storeChannel('slack', {
288
+ const stored = await api.storeChannel('slack', {
289
289
  agentId: agentPicker.value,
290
290
  appToken: appToken.value,
291
291
  botToken: botToken.value,
@@ -293,7 +293,15 @@ export const renderSettings = (section) => {
293
293
  appToken.value = '';
294
294
  botToken.value = '';
295
295
  state.credentials = await api.credentials();
296
- say('Stored. Restart stratusd to bring that agent online in Slack.');
296
+ // A daemon that reloads Slack connects the app now; one that
297
+ // started without Slack, or could not reload, needs the restart.
298
+ if (stored.reloaded) {
299
+ say("Stored. Slack reloaded, so that agent comes online without a restart. If it doesn't, the daemon log says why.");
300
+ } else if (stored.reason) {
301
+ say(`Stored. ${stored.reason}`, 'bad');
302
+ } else {
303
+ say('Stored. Restart stratusd to bring that agent online in Slack.');
304
+ }
297
305
  } catch (error) {
298
306
  say(error.message, 'bad');
299
307
  }