From b695a4ba3b2c45abc8f22740b31d9f8d0a0fa77f Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 25 Oct 2023 23:13:46 +0000 Subject: [PATCH] Sort issues open first, and show checkboxes for open/closed. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4583 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- apps/issues.json | 3 ++- apps/issues/script.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/issues.json b/apps/issues.json index 123575cb..eefff625 100644 --- a/apps/issues.json +++ b/apps/issues.json @@ -1,4 +1,5 @@ { "type": "tildefriends-app", - "emoji": "🦟" + "emoji": "🦟", + "previous": "&TegdzvFE+im94shygaHkgDYSaSrwY2h0OKUXSRPBQDM=.sha256" } \ No newline at end of file diff --git a/apps/issues/script.js b/apps/issues/script.js index 59707e0c..1c9c2d32 100644 --- a/apps/issues/script.js +++ b/apps/issues/script.js @@ -136,7 +136,7 @@ class TfIssuesAppElement extends LitElement { break; } } - this.issues = Object.values(issues).sort((x, y) => y.created - x.created); + this.issues = Object.values(issues).sort((x, y) => (y.open - x.open) || (y.created - x.created)); if (this.selected) { for (let issue of this.issues) { if (issue.id == this.selected.id) { @@ -149,7 +149,7 @@ class TfIssuesAppElement extends LitElement { render_issue_table_row(issue) { return html` - ${issue.open ? 'open' : 'closed'} + ${issue.open ? '☐ open' : '☑ closed'} ${issue.author} this.selected = issue}> ${issue.text.split('\n')?.[0]}