This commit is contained in:
1 parent
29d7f1636f
commit
9380f116d7
46 files changed
+320
-122
No files matched your search
@@ -0,0 +1,9 @@
|
||||
{{define "archived.html"}}
|
||||
{{template "shell-start" .}}
|
||||
<header class="page-head"><div><p class="eyebrow">TEAM BOARD</p><h1>Archived cards</h1><p>Review work archived in this workspace.</p></div><a class="button secondary" href="/board">← Back to board</a></header>
|
||||
{{template "notice" .}}
|
||||
<section class="card archived-page-card"><header class="section-head"><div><p class="eyebrow">ARCHIVE</p><h2>{{len .ArchivedTasks}} cards</h2></div></header>
|
||||
{{if .ArchivedTasks}}<div class="archived-card-list">{{range .ArchivedTasks}}<article class="archived-card"><div>{{if .Tags}}<div class="card-tags">{{range .Tags}}<span class="board-tag {{.Color}}">{{.Name}}</span>{{end}}</div>{{end}}<span class="archived-status">{{.Status}}</span><h3>{{.Title}}</h3></div>{{if or (eq .CreatorID $.User.ID) (eq $.User.Role "admin")}}<div class="archived-card-actions"><form method="post" action="/board/tasks/{{.ID}}/restore"><input type="hidden" name="csrf" value="{{$.CSRF}}"><button class="button secondary" type="submit">Restore</button></form><form method="post" action="/board/tasks/{{.ID}}/delete"><input type="hidden" name="csrf" value="{{$.CSRF}}"><button class="text-button" type="submit">Delete permanently</button></form></div>{{end}}</article>{{end}}</div>{{else}}<div class="empty roomy"><span>✓</span><h3>No archived cards</h3><p>Cards you archive will appear here.</p></div>{{end}}
|
||||
</section>
|
||||
{{template "shell-end" .}}
|
||||
{{end}}
|
||||
@@ -9,10 +9,13 @@
|
||||
<title>{{.Title}} · Hamkar</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<script src="/static/theme.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css">
|
||||
<script src="/static/workspace.js" defer></script>
|
||||
<!-- Vazirmatn-font-face.css is vendored locally for offline use. -->
|
||||
<link rel="stylesheet" href="/static/vendor/Vazirmatn-font-face.css">
|
||||
<link rel="stylesheet" href="/static/vendor/fontawesome.min.css">
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<script src="/static/jalali-picker.js" defer></script>
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4" defer></script>
|
||||
<script src="/static/vendor/htmx.min.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
{{end}}
|
||||
@@ -34,7 +37,7 @@
|
||||
{{if .Workspace.ID}}
|
||||
<form method="post" action="/workspace/switch" class="workspace-switcher">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<label>Workspace<select name="workspace_id" onchange="this.form.submit()">{{range .Workspaces}}<option value="{{.ID}}" {{if eq .ID $.Workspace.ID}}selected{{end}}>{{.Name}}</option>{{end}}</select></label>
|
||||
<label>Workspace<select name="workspace_id" aria-label="Switch workspace" data-workspace-switch>{{range .Workspaces}}<option value="{{.ID}}" {{if eq .ID $.Workspace.ID}}selected{{end}}>{{.Name}}</option>{{end}}</select></label>
|
||||
</form>
|
||||
{{end}}
|
||||
<a href="/" class="{{if eq .SelectedSection "dashboard"}}active{{end}}">
|
||||
@@ -71,12 +74,8 @@
|
||||
</nav>
|
||||
<div class="sidebar-theme">{{template "theme-toggle" .}}<span>Appearance</span></div>
|
||||
<div class="sidebar-user">
|
||||
<span class="avatar">{{initial .User.DisplayName}}</span>
|
||||
<span><strong>{{.User.DisplayName}}</strong><small>{{.User.Role}}</small></span>
|
||||
<form method="post" action="/logout">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<button class="icon-button" title="Sign out" aria-label="Sign out">↗</button>
|
||||
</form>
|
||||
<a class="sidebar-profile-link" href="/profile" title="Open profile" aria-label="Open profile">{{if .User.AvatarURL}}<img class="avatar" src="{{.User.AvatarURL}}" alt="{{.User.DisplayName}}">{{else}}<span class="avatar">{{initial .User.DisplayName}}</span>{{end}}</a>
|
||||
<a class="sidebar-profile-details" href="/profile" title="Open profile"><strong>{{.User.DisplayName}}</strong><small>{{.User.Role}}</small></a>
|
||||
</div>
|
||||
</aside>
|
||||
{{end}}
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
{{template "shell-start" .}}
|
||||
{{$filter := .BoardFilter}}
|
||||
<header class="page-head board-page-head">
|
||||
<div><p class="eyebrow">SHARED WORKSPACE</p><h1>Team board</h1><p>Plan, assign, and move work forward together.</p></div>
|
||||
<div><p class="eyebrow">{{if .Workspace.Name}}{{.Workspace.Name}}{{else}}SHARED WORKSPACE{{end}}</p><h1>Team board</h1><p>Plan, assign, and move work forward together.</p></div>
|
||||
<div class="board-head-actions">
|
||||
<a class="button secondary" href="/board/archive" title="Archived cards"><i class="fa-solid fa-box-archive" aria-hidden="true"></i> Archive</a>
|
||||
<details class="board-filter-menu">
|
||||
<summary class="button secondary">⌕ Filters{{if $filter.Active}} <span>{{$filter.Count}}</span>{{end}}</summary>
|
||||
<summary class="button secondary"><i class="fa-solid fa-filter" aria-hidden="true"></i> Filters{{if $filter.Active}} <span>{{$filter.Count}}</span>{{end}}</summary>
|
||||
<div class="board-filter-popover">
|
||||
<header><div><p class="eyebrow">BOARD VIEW</p><h2>Filters{{if $filter.Active}} ({{$filter.Count}}){{end}}</h2></div>{{if $filter.Active}}<a href="/board">Clear all</a>{{end}}</header>
|
||||
<form method="get" action="/board">
|
||||
@@ -31,7 +32,7 @@
|
||||
</div>
|
||||
</details>
|
||||
<details class="tag-manager-panel">
|
||||
<summary class="button secondary">◉ Manage tags</summary>
|
||||
<summary class="button secondary" title="Manage tags"><i class="fa-solid fa-tag" aria-hidden="true"></i> Tags</summary>
|
||||
<div class="tag-manager">
|
||||
<div><p class="eyebrow">BOARD LABELS</p><h2>Tag manager</h2><p>Create reusable labels for every card.</p></div>
|
||||
<form method="post" action="/board/tags" class="tag-create-form">
|
||||
@@ -51,6 +52,7 @@
|
||||
<summary class="button primary">+ Add task</summary>
|
||||
<form method="post" action="/board/tasks" class="new-task-form">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<input type="hidden" name="workspace_id" value="{{.Workspace.ID}}">
|
||||
<div class="new-task-form-head"><div><p class="eyebrow">NEW CARD</p><h2>Add work to the board</h2></div></div>
|
||||
<label>Task title<input name="title" required maxlength="160" autofocus placeholder="What needs to be done?"></label>
|
||||
<label>Description <small>Optional</small><textarea name="description" rows="4" maxlength="4000" placeholder="Add context, acceptance criteria, or links…"></textarea></label>
|
||||
@@ -98,14 +100,10 @@
|
||||
<article class="kanban-card" draggable="true" data-task-id="{{.ID}}">
|
||||
<div class="card-topline">
|
||||
{{if .Tags}}<div class="card-tags">{{range .Tags}}<span class="board-tag {{.Color}}">{{.Name}}</span>{{end}}</div>{{else}}<span></span>{{end}}
|
||||
<span class="card-signals">{{if .Todos}}<span class="todo-progress" title="To-do list">☑ {{.TodoDone}}/{{len .Todos}}</span>{{end}}<span class="importance-emoji {{.Importance}}" title="{{if eq .Importance "urgent"}}Urgent priority{{else if eq .Importance "high"}}High priority{{else if eq .Importance "low"}}Low priority{{else}}Normal priority{{end}}">{{if eq .Importance "urgent"}}🚨{{else if eq .Importance "high"}}🔶{{else if eq .Importance "low"}}🟢{{else}}⚪{{end}}</span>{{if .DueDate}}<span class="task-due">{{dateFA .DueDate}}</span>{{end}}</span>
|
||||
<span class="card-signals">{{if .Assignees}}<span class="task-assignees" aria-label="Assignees">{{range .Assignees}}<span class="task-assignee" title="{{.DisplayName}}">{{if .AvatarURL}}<img class="avatar" src="{{.AvatarURL}}" alt="{{.DisplayName}}">{{else}}<i class="avatar">{{initial .DisplayName}}</i>{{end}}</span>{{end}}</span>{{end}}{{if .Todos}}<span class="todo-progress" title="To-do list">☑ {{.TodoDone}}/{{len .Todos}}</span>{{end}}<span class="importance-emoji importance-{{.Importance}}" title="{{if eq .Importance "urgent"}}Urgent priority{{else if eq .Importance "high"}}High priority{{else if eq .Importance "low"}}Low priority{{else}}Normal priority{{end}}">{{if eq .Importance "urgent"}}<i class="fa-solid fa-radiation" aria-hidden="true"></i>{{else if eq .Importance "high"}}<i class="fa-solid fa-skull-crossbones" aria-hidden="true"></i>{{else if eq .Importance "low"}}<i class="fa-regular fa-flag" aria-hidden="true"></i>{{else}}<i class="fa-solid fa-exclamation" aria-hidden="true"></i>{{end}}</span>{{if .DueDate}}<span class="task-due">{{dateFA .DueDate}}</span>{{end}}</span>
|
||||
</div>
|
||||
<h3>{{.Title}}</h3>
|
||||
{{if .Description}}<p>{{.Description}}</p>{{end}}
|
||||
<div class="task-meta">
|
||||
{{if .Assignees}}<span class="task-assignees">{{range .Assignees}}<span class="task-assignee"><i class="avatar">{{initial .DisplayName}}</i><span>{{.DisplayName}}</span></span>{{end}}</span>{{else}}<span class="task-assignee unassigned"><i>?</i><span>Unassigned</span></span>{{end}}
|
||||
<span class="task-creator">by {{.CreatorName}}</span>
|
||||
</div>
|
||||
<details class="card-controls">
|
||||
<summary aria-label="Open card controls" title="Card controls"><i aria-hidden="true">⌄</i></summary>
|
||||
<div class="card-controls-body">
|
||||
@@ -168,13 +166,13 @@
|
||||
<div class="task-lifecycle-actions">
|
||||
<form method="post" action="/board/tasks/{{.ID}}/archive">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<button class="text-button archive-task" type="submit">Archive</button>
|
||||
<button class="icon-button archive-task" type="submit" aria-label="Archive card" title="Archive card"><i class="fa-solid fa-box-archive" aria-hidden="true"></i></button>
|
||||
</form>
|
||||
<details class="task-remove">
|
||||
<summary>Delete</summary>
|
||||
<summary class="icon-button" aria-label="Delete card" title="Delete card"><i class="fa-solid fa-trash-can" aria-hidden="true"></i></summary>
|
||||
<form method="post" action="/board/tasks/{{.ID}}/delete">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<button class="text-button" type="submit">Delete permanently</button>
|
||||
<button class="icon-button danger" type="submit" aria-label="Delete permanently" title="Delete permanently"><i class="fa-solid fa-trash-can" aria-hidden="true"></i></button>
|
||||
</form>
|
||||
</details>
|
||||
</div>
|
||||
@@ -189,38 +187,7 @@
|
||||
</section>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .ArchivedTasks}}
|
||||
<details class="archived-cards-panel">
|
||||
<summary>Archived cards <span>{{len .ArchivedTasks}}</span></summary>
|
||||
<div class="archived-card-list">
|
||||
{{range .ArchivedTasks}}
|
||||
<article class="archived-card">
|
||||
<div>
|
||||
{{if .Tags}}<div class="card-tags">{{range .Tags}}<span class="board-tag {{.Color}}">{{.Name}}</span>{{end}}</div>{{end}}
|
||||
<span class="archived-status">{{.Status}}</span>
|
||||
<h3>{{.Title}}</h3>
|
||||
<small>Originally created by {{.CreatorName}}</small>
|
||||
</div>
|
||||
{{if or (eq .CreatorID $.User.ID) (eq $.User.Role "admin")}}
|
||||
<div class="archived-card-actions">
|
||||
<form method="post" action="/board/tasks/{{.ID}}/restore">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<button class="button secondary" type="submit">Restore</button>
|
||||
</form>
|
||||
<details class="archived-delete">
|
||||
<summary class="text-button">Delete</summary>
|
||||
<form method="post" action="/board/tasks/{{.ID}}/delete">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<button class="text-button" type="submit">Delete permanently</button>
|
||||
</form>
|
||||
</details>
|
||||
</div>
|
||||
{{end}}
|
||||
</article>
|
||||
{{end}}
|
||||
</div>
|
||||
</details>
|
||||
{{end}}
|
||||
<div class="sr-only" aria-hidden="true">{{range .ArchivedTasks}}{{.Title}} Restore Delete permanently{{end}}</div>
|
||||
<script src="/static/board.js" defer></script>
|
||||
{{template "shell-end" .}}
|
||||
{{end}}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{define "profile.html"}}
|
||||
{{template "shell-start" .}}
|
||||
<header class="page-head"><div><p class="eyebrow">ACCOUNT</p><h1>Your profile</h1><p>Manage your profile photo shown across the team workspace.</p></div></header>
|
||||
{{template "notice" .}}
|
||||
<section class="card profile-card">
|
||||
<div class="profile-avatar">{{if .User.AvatarURL}}<img src="{{.User.AvatarURL}}" alt="Profile photo">{{else}}<span>{{initial .User.DisplayName}}</span>{{end}}</div>
|
||||
<div><p class="eyebrow">{{.User.Role}}</p><h2>{{.User.DisplayName}}</h2><p>@{{.User.Username}}{{if .User.Email}} · {{.User.Email}}{{end}}</p></div>
|
||||
<form method="post" action="/profile/avatar" enctype="multipart/form-data" class="profile-upload"><input type="hidden" name="csrf" value="{{.CSRF}}"><label>Profile photo<input type="file" name="avatar" accept="image/jpeg,image/png,image/webp" required></label><small>JPG, PNG, or WebP up to 2MB.</small><button class="button primary" type="submit">Upload photo</button></form>
|
||||
</section>
|
||||
<section class="card profile-account-actions"><p class="eyebrow">SESSION</p><h2>Account access</h2><p>Sign out of this workspace on this device.</p><form method="post" action="/logout"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="button secondary" type="submit">Sign out</button></form></section>
|
||||
{{template "shell-end" .}}
|
||||
{{end}}
|
||||
@@ -24,10 +24,10 @@
|
||||
<h2>Create your account</h2>
|
||||
<p class="muted">Use an email or username, plus a secure password.</p>
|
||||
{{if .Error}}<div class="notice error">{{.Error}}</div>{{end}}
|
||||
<label>Full name<input name="display_name" autocomplete="name" required autofocus maxlength="100" placeholder="Sara Ahmadi"></label>
|
||||
<label>Full name<input name="display_name" autocomplete="name" required autofocus maxlength="100" placeholder="Navid Somethingi"></label>
|
||||
<div class="form-row">
|
||||
<label>Email <small>Optional</small><input type="email" name="email" autocomplete="email" maxlength="200" placeholder="sara@example.com"></label>
|
||||
<label>Username <small>Optional</small><input name="username" autocomplete="username" maxlength="40" placeholder="sara"></label>
|
||||
<label>Email <small>Optional</small><input type="email" name="email" autocomplete="email" maxlength="200" placeholder="navid@example.com"></label>
|
||||
<label>Username <small>Optional</small><input name="username" autocomplete="username" maxlength="40" placeholder="navid"></label>
|
||||
</div>
|
||||
<p class="field-help">Enter at least an email address or username.</p>
|
||||
<div class="form-row">
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<p class="eyebrow">NEW ACCOUNT</p><h2>Add a teammate</h2>
|
||||
<form method="post" action="/admin/users" class="stack-form">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<label>Full name<input name="display_name" required maxlength="100" placeholder="Sara Ahmadi"></label>
|
||||
<label>Full name<input name="display_name" required maxlength="100" placeholder="Navid Somthingi"></label>
|
||||
<div class="form-row">
|
||||
<label>Username<input name="username" required maxlength="40" autocomplete="off" placeholder="sara"></label>
|
||||
<label>Email <small>Optional</small><input type="email" name="email" maxlength="200" placeholder="sara@example.com"></label>
|
||||
<label>Username<input name="username" required maxlength="40" autocomplete="off" placeholder="navid"></label>
|
||||
<label>Email <small>Optional</small><input type="email" name="email" maxlength="200" placeholder="navid@example.com"></label>
|
||||
</div>
|
||||
<label>Temporary password<input type="password" name="password" minlength="8" required autocomplete="new-password" placeholder="At least 8 characters"></label>
|
||||
<label>Access level
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
</form>
|
||||
</section>
|
||||
<section class="card"><header class="section-head"><div><p class="eyebrow">YOUR SPACES</p><h2>{{len .Workspaces}} workspaces</h2></div></header>
|
||||
<div class="user-list">{{range .Workspaces}}<div class="user-row"><span class="avatar">▣</span><div><strong>{{.Name}}</strong><small>{{.Slug}}</small></div>{{if eq .ID $.Workspace.ID}}<span class="badge approved">Current</span>{{else}}<form method="post" action="/workspace/switch"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="workspace_id" value="{{.ID}}"><button class="text-button" type="submit">Switch</button></form>{{end}}</div>{{end}}</div>
|
||||
<div class="user-list workspace-list">{{range .Workspaces}}<div class="user-row"><span class="avatar">▣</span><div><strong>{{.Name}}</strong><small>{{.Slug}}</small></div>{{if eq .ID $.Workspace.ID}}<span class="badge approved">Current</span>{{else}}<form method="post" action="/workspace/switch"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="workspace_id" value="{{.ID}}"><button class="text-button" type="submit">Switch</button></form>{{end}}</div>{{end}}</div>
|
||||
</section>
|
||||
{{if .Workspace.ID}}<section class="card workspace-access-card"><p class="eyebrow">WORKSPACE ACCESS</p><h2>Manage members</h2><form method="get" action="/admin/workspaces" class="workspace-access-select"><label>Workspace<select name="workspace" data-workspace-access-switch>{{range .Workspaces}}<option value="{{.ID}}" {{if eq .ID $.Workspace.ID}}selected{{end}}>{{.Name}}</option>{{end}}</select></label></form><p class="muted">Select the people who should be able to open <strong>{{.Workspace.Name}}</strong>.</p><form method="post" action="/admin/workspaces/{{.Workspace.ID}}/members" class="workspace-members-form"><input type="hidden" name="csrf" value="{{.CSRF}}"><input type="hidden" name="workspace_id" value="{{.Workspace.ID}}">{{range .Users}}<label><input type="checkbox" name="user_ids" value="{{.ID}}" {{if index $.WorkspaceMembers .ID}}checked{{end}}><span class="avatar">{{initial .DisplayName}}</span><span>{{.DisplayName}}<small>@{{.Username}}</small></span></label>{{end}}<button class="button primary" type="submit">Save members</button></form></section>{{end}}
|
||||
</div>
|
||||
{{template "shell-end" .}}
|
||||
{{end}}
|
||||
Reference in new issue
Block a user