diff --git a/classifier/js/app.js b/classifier/js/app.js index ea0760f..f3ebfe9 100644 --- a/classifier/js/app.js +++ b/classifier/js/app.js @@ -259,7 +259,7 @@ var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; - a.download = String(name).replace(/[^\w.-]+/g, '_') + '.json'; + a.download = String(name).replace(/[^\w.-]+/g, '_') + '.zddc-classification.json'; document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url); } diff --git a/classifier/js/workspace.js b/classifier/js/workspace.js index 107d141..5280ff1 100644 --- a/classifier/js/workspace.js +++ b/classifier/js/workspace.js @@ -108,10 +108,15 @@ var actions = document.createElement('div'); actions.className = 'ws-row__actions'; + var titles = { + export: 'Export this whole workspace (scanned snapshot + classifications) to transfer to another browser or back up', + delete: 'Delete this workspace — your source files are untouched', + }; [['open', 'Open'], ['rename', 'Rename'], ['export', 'Export'], ['delete', 'Delete']].forEach(function (a) { var b = document.createElement('button'); b.className = 'btn btn-sm ' + (a[0] === 'open' ? 'btn-primary' : 'btn-secondary'); b.dataset.act = a[0]; b.textContent = a[1]; + if (titles[a[0]]) b.title = titles[a[0]]; actions.appendChild(b); }); row.appendChild(main); row.appendChild(actions); @@ -374,5 +379,6 @@ onRescanned: onRescanned, renderList: renderList, activeId: function () { return activeId; }, + activeName: function () { return activeMeta ? activeMeta.name : null; }, }; })(); diff --git a/classifier/template.html b/classifier/template.html index f653e37..f5c63a8 100644 --- a/classifier/template.html +++ b/classifier/template.html @@ -162,8 +162,8 @@