Unified · Split
| @@ -1,21 +1,9 @@ | |||
| 1 | // TODO: This file was created by bulk-decaffeinate. | ||
| 2 | // Sanity-check the conversion and remove this comment. | ||
| 3 | /* | ||
| 4 | * decaffeinate suggestions: | ||
| 5 | * DS101: Remove unnecessary use of Array.from | ||
| 6 | * DS102: Remove unnecessary code created because of implicit returns | ||
| 7 | * DS205: Consider reworking code to avoid use of IIFEs | ||
| 8 | * DS207: Consider shorter variations of null checks | ||
| 9 | * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md | ||
| 10 | */ | ||
| 11 | app.templates.aboutPage = function () { | 1 | app.templates.aboutPage = function () { |
| 12 | let doc; | 2 | let doc; |
| 13 | const all_docs = app.docs | 3 | const all_docs = app.docs.all().concat(...(app.disabledDocs.all() || [])); |
| 14 | .all() | ||
| 15 | .concat(...Array.from(app.disabledDocs.all() || [])); | ||
| 16 | // de-duplicate docs by doc.name | 4 | // de-duplicate docs by doc.name |
| 17 | const docs = []; | 5 | const docs = []; |
| 18 | for (doc of Array.from(all_docs)) { | 6 | for (doc of all_docs) { |
| 19 | if (!docs.find((d) => d.name === doc.name)) { | 7 | if (!docs.find((d) => d.name === doc.name)) { |
| 20 | docs.push(doc); | 8 | docs.push(doc); |
| 21 | } | 9 | } |
| @@ -85,23 +73,12 @@ app.templates.aboutPage = function () { · 63 unmodified lines | |||
| 85 | <th>Documentation | 73 | <th>Documentation |
| 86 | <th>Copyright/License | 74 | <th>Copyright/License |
| 87 | <th>Source code | 75 | <th>Source code |
| 88 | ${(() => { | 76 | ${docs |
| 89 | const result = []; | 77 | .map( |
| 90 | 78 | (doc) => | |
| 91 | for (doc of Array.from(docs)) { | 79 | `<tr><td><a href="${doc.links?.home}">${doc.name}</a></td><td>${doc.attribution}</td><td><a href="${doc.links?.code}">Source code</a></td></tr>`, |
| 92 | result.push(`<tr> \ | 80 | ) |
| 93 | <td><a href=\"${doc.links != null ? doc.links.home : undefined}\">${ | 81 | .join("")} |
| 94 | doc.name | ||
| 95 | }</a></td> \ | ||
| 96 | <td>${doc.attribution}</td> \ | ||
| 97 | <td><a href=\"${ | ||
| 98 | doc.links != null ? doc.links.code : undefined | ||
| 99 | }\">Source code</a></td> \ | ||
| 100 | </tr>`); | ||
| 101 | } | ||
| 102 | |||
| 103 | return result; | ||
| 104 | })().join("")} | ||
| 105 | </table> | 82 | </table> |
| 106 | </div> | 83 | </div> |
| 107 | 84 | ||