From 19c54a99cda1b0578077f816a518d37830f41578 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 18 Aug 2017 16:01:55 +0000 Subject: [PATCH] Improved web app title construction --- src/web/App.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/web/App.js b/src/web/App.js index 8887a927..d6287568 100755 --- a/src/web/App.js +++ b/src/web/App.js @@ -676,7 +676,14 @@ App.prototype.stateChange = function(e) { if (recipeConfig.length === 1) { title = `${recipeConfig[0].op} - ${title}`; } else if (recipeConfig.length > 1) { - title = `${recipeConfig.length} operations - ${title}`; + // See how long the full recipe is + const ops = recipeConfig.map(op => op.op).join(", "); + if (ops.length < 45) { + title = `${ops} - ${title}`; + } else { + // If it's too long, just use the first one and say how many more there are + title = `${recipeConfig[0].op}, ${recipeConfig.length - 1} more - ${title}`; + } } document.title = title;