Skip to content

armgit / kanzo

Public Imported from GitHub
0

Self-hosted, sharable kanban for humans and agents. One 4.7 MB binary, 5 MB of RAM, 10 to 60 tokens per agent reply, starts in 3 ms, zero setup.

Tidy the New task button

emanuele-emc80ccab5c2e2
diff --git a/src/app.js b/src/app.js
index babc1c7..5ca7e46 100644
--- a/src/app.js
+++ b/src/app.js
@@ -471,7 +471,6 @@ function renderHeader() {
const p = currentProject();
const { projects, tasks } = state.board;
const header = $("#header");
- // New tasks go in the inbox column; the task's Status field moves them elsewhere.
$("#new-task").hidden = !projects.length;
if (!projects.length) { header.replaceChildren(); return; }
// Plain words for what each piece is: how much is open, and the repos on GitHub.
@@ -664,8 +663,9 @@ function localStorageGet(k) {
// ---------- new task ----------
-// "+ Add task" creates the task at once and opens it like any other, with its
-// title selected to type over. Closed untouched, it is deleted again.
+// New task creates the task in todo at once and opens it like any other, with its title
+// selected to type over; its Status field moves it elsewhere. Closed untouched, it is
+// deleted again.
const NEW_TITLE = "New task";
let fresh = null; // id of the task just added, until something in it is saved
@@ -711,7 +711,7 @@ function hideNewProject() {
$("#new-project-toggle").hidden = false;
}
-$("#new-task").addEventListener("click", () => newTask());
+$("#new-task").addEventListener("click", newTask);
$("#new-project-toggle").addEventListener("click", showNewProject);
$("#new-project-cancel").addEventListener("click", hideNewProject);
$("#new-project").addEventListener("submit", async (e) => {
diff --git a/src/index.html b/src/index.html
index b4f8968..428b642 100644
--- a/src/index.html
+++ b/src/index.html
@@ -147,9 +147,8 @@ header .repo-link {
}
header .repo-link:hover, header .repo-link:focus-visible { background: var(--active); color: var(--text); }
header .repo-link .icon svg { width: 14px; height: 14px; }
-header .new-task { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; flex: none; }
-header .new-task[hidden] { display: none; }
-header .new-task .icon svg { width: 16px; height: 16px; }
+#new-task { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; }
+#new-task .icon svg { width: 16px; height: 16px; }
.columns {
flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
gap: 12px; padding: 0 24px 24px; overflow-x: auto;
@@ -401,7 +400,7 @@ header .new-task .icon svg { width: 16px; height: 16px; }
<main>
<header>
<div class="info" id="header"></div>
- <button class="btn primary new-task" id="new-task" title="New task (n)" hidden><span class="icon" data-icon="plus"></span>New task</button>
+ <button class="btn primary" id="new-task" title="New task (n)" hidden><span class="icon" data-icon="plus"></span>New task</button>
</header>
<div class="columns" id="columns"></div>
</main>