Browse Source

add Background (Orange) and Progress (Violet) project types.

main
Gisle Aune 4 years ago
parent
commit
330b740e00
  1. 4
      svelte-ui/src/components/QuestLog.svelte
  2. 10
      svelte-ui/src/components/StatusColor.svelte
  3. 5
      svelte-ui/src/components/StatusTagSelect.svelte
  4. 2
      svelte-ui/src/forms/ProjectForm.svelte

4
svelte-ui/src/components/QuestLog.svelte

@ -31,6 +31,8 @@
$: failedProjects = inactiveProjects.filter(p => p.statusTag === "failed" || p.statusTag === "declined"); $: failedProjects = inactiveProjects.filter(p => p.statusTag === "failed" || p.statusTag === "declined");
$: onholdProjects = inactiveProjects.filter(p => p.statusTag === "on hold" || p.statusTag === "onhold"); $: onholdProjects = inactiveProjects.filter(p => p.statusTag === "on hold" || p.statusTag === "onhold");
$: ideaProjects = inactiveProjects.filter(p => p.statusTag === "to do" || p.statusTag === "idea"); $: ideaProjects = inactiveProjects.filter(p => p.statusTag === "to do" || p.statusTag === "idea");
$: backgroundProjects = inactiveProjects.filter(p => p.statusTag === "background");
$: progressProjects = inactiveProjects.filter(p => p.statusTag === "progress");
$: { $: {
if (project === null && projects.length > 0) { if (project === null && projects.length > 0) {
@ -60,8 +62,10 @@
<Boi compacter open={mdProjectAdd}>Add Project</Boi> <Boi compacter open={mdProjectAdd}>Add Project</Boi>
<QlList label="Deadlines" projects={expiringProjects} /> <QlList label="Deadlines" projects={expiringProjects} />
<QlList label="Active" projects={activeProjects} /> <QlList label="Active" projects={activeProjects} />
<QlList label="Background" projects={backgroundProjects} />
<QlList label="To Do" projects={ideaProjects} /> <QlList label="To Do" projects={ideaProjects} />
<QlList label="On Hold" projects={onholdProjects} /> <QlList label="On Hold" projects={onholdProjects} />
<QlList label="Progress" projects={progressProjects} />
<QlList label="Completed" projects={completedProjects} /> <QlList label="Completed" projects={completedProjects} />
<QlList label="Failed" projects={failedProjects} /> <QlList label="Failed" projects={failedProjects} />
</div> </div>

10
svelte-ui/src/components/StatusColor.svelte

@ -21,12 +21,14 @@
$: onhold = !entry.active && entry.statusTag === "on hold"; $: onhold = !entry.active && entry.statusTag === "on hold";
$: todo = !entry.active && entry.statusTag === "to do"; $: todo = !entry.active && entry.statusTag === "to do";
$: wontdo = !entry.active && entry.statusTag === "declined"; $: wontdo = !entry.active && entry.statusTag === "declined";
$: progress = !entry.active && entry.statusTag === "progress";
$: background = !entry.active && entry.statusTag === "background";
$: task = affects === "task"; $: task = affects === "task";
$: project = affects === "project"; $: project = affects === "project";
</script> </script>
<div class="status-color-context" class:project class:task class:selected class:completed class:failed class:onhold class:todo class:wontdo>
<div class="status-color-context" class:project class:task class:selected class:completed class:failed class:onhold class:todo class:wontdo class:progress class:background>
<slot></slot> <slot></slot>
</div> </div>
@ -49,6 +51,12 @@
.status-color-context.project.wontdo :global(.sccfg) { color: #7a2973 !important; } .status-color-context.project.wontdo :global(.sccfg) { color: #7a2973 !important; }
.status-color-context.project.wontdo.selected :global(.sccfg) { color: #e75ed0 !important; } .status-color-context.project.wontdo.selected :global(.sccfg) { color: #e75ed0 !important; }
.status-color-context.project.wontdo :global(.sccpb) { background-color: #e75ed0 !important; } .status-color-context.project.wontdo :global(.sccpb) { background-color: #e75ed0 !important; }
.status-color-context.project.progress :global(.sccfg) { color: #63297a !important; }
.status-color-context.project.progress.selected :global(.sccfg) { color: #a95ee7 !important; }
.status-color-context.project.progress :global(.sccpb) { background-color: #a95ee7 !important; }
.status-color-context.project.background :global(.sccfg) { color: #7a5429 !important; }
.status-color-context.project.background.selected :global(.sccfg) { color: #e7a75e !important; }
.status-color-context.project.background :global(.sccpb) { background-color: #e7a75e !important; }
.status-color-context.task.completed :global(.sccsi) { background-color: #484 !important; color: #78ff78 !important; } .status-color-context.task.completed :global(.sccsi) { background-color: #484 !important; color: #78ff78 !important; }
.status-color-context.task.failed :global(.sccsi) { background-color: #85242c !important; color: #ff4545 !important; } .status-color-context.task.failed :global(.sccsi) { background-color: #85242c !important; color: #ff4545 !important; }

5
svelte-ui/src/components/StatusTagSelect.svelte

@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
export let value: string; export let value: string;
export let disabled: boolean = false; export let disabled: boolean = false;
export let isProject: boolean = false;
</script> </script>
<select name="statusTag" bind:value={value} disabled={disabled}> <select name="statusTag" bind:value={value} disabled={disabled}>
@ -10,4 +11,8 @@
<option value="on hold" selected={"on hold" === value}>On Hold</option> <option value="on hold" selected={"on hold" === value}>On Hold</option>
<option value="to do" selected={"to do" === value}>To Do</option> <option value="to do" selected={"to do" === value}>To Do</option>
<option value="declined" selected={"declined" === value}>Won't Do</option> <option value="declined" selected={"declined" === value}>Won't Do</option>
{#if isProject}
<option value="background" selected={"background" === value}>Background</option>
<option value="progress" selected={"progress" === value}>Progress</option>
{/if}
</select> </select>

2
svelte-ui/src/forms/ProjectForm.svelte

@ -112,7 +112,7 @@
<label for="endTime">Deadline (Optional)</label> <label for="endTime">Deadline (Optional)</label>
<DeadlineSelect disabled={deletion} bind:value={endTime} /> <DeadlineSelect disabled={deletion} bind:value={endTime} />
<label for="statusTag">Status</label> <label for="statusTag">Status</label>
<StatusTagSelect disabled={deletion} bind:value={statusTag} />
<StatusTagSelect disabled={deletion} isProject bind:value={statusTag} />
<Checkbox disabled={deletion} bind:checked={favorite} label="Mark as favorite." /> <Checkbox disabled={deletion} bind:checked={favorite} label="Mark as favorite." />

Loading…
Cancel
Save