Browse Source

delete old project page. It is a lost cause.

main
Gisle Aune 3 years ago
parent
commit
d551579d6a
  1. 4
      svelte-ui/src/App.svelte
  2. 16
      svelte-ui/src/components/Menu.svelte
  3. 4
      svelte-ui/src/components/TableOfContent.svelte
  4. 57
      svelte-ui/src/pages/ProjectPage.svelte

4
svelte-ui/src/App.svelte

@ -5,9 +5,9 @@
import authStore from "./stores/auth"; import authStore from "./stores/auth";
import Boi from "./components/Boi.svelte"; import Boi from "./components/Boi.svelte";
import { signOut } from "./clients/amplify"; import { signOut } from "./clients/amplify";
import markStale from "./stores/markStale";
import FrontPage from "./pages/FrontPage.svelte"; import FrontPage from "./pages/FrontPage.svelte";
import ProjectPage from "./pages/ProjectPage.svelte";
import LogsPage from "./pages/LogsPage.svelte"; import LogsPage from "./pages/LogsPage.svelte";
import GroupPage from "./pages/GroupPage.svelte"; import GroupPage from "./pages/GroupPage.svelte";
import GoalPage from "./pages/GoalPage.svelte"; import GoalPage from "./pages/GoalPage.svelte";
@ -26,7 +26,6 @@
import ModalRoute from "./components/ModalRoute.svelte"; import ModalRoute from "./components/ModalRoute.svelte";
import FocusHandler from "./components/FocusHandler.svelte"; import FocusHandler from "./components/FocusHandler.svelte";
import Menu from "./components/Menu.svelte"; import Menu from "./components/Menu.svelte";
import markStale from "./stores/markStale";
async function logout() { async function logout() {
await signOut(); await signOut();
@ -47,7 +46,6 @@ import markStale from "./stores/markStale";
<main> <main>
<Route path="/" component={FrontPage} /> <Route path="/" component={FrontPage} />
<Route path="/goals/" component={GoalPage} /> <Route path="/goals/" component={GoalPage} />
<Route path="/projects/" component={ProjectPage} />
<Route path="/questlog/:gid/:pid" let:params > <Route path="/questlog/:gid/:pid" let:params >
<QlPage groupId={params.gid} projectId={params.pid} /> <QlPage groupId={params.gid} projectId={params.pid} />
</Route> </Route>

16
svelte-ui/src/components/Menu.svelte

@ -15,8 +15,7 @@
<nav> <nav>
<a class:selected={selected.home} use:link href="/">Stufflog</a> <a class:selected={selected.home} use:link href="/">Stufflog</a>
<a class:selected={selected.goals} use:link href="/goals">Goals</a> <a class:selected={selected.goals} use:link href="/goals">Goals</a>
<a class="desktop" class:selected={selected.questlog} use:link href="/questlog">Projects</a>
<a class="mobile" class:selected={selected.projects} use:link href="/projects">Projects</a>
<a class:selected={selected.questlog} use:link href="/questlog">Projects</a>
<a class:selected={selected.items} use:link href="/items">Items</a> <a class:selected={selected.items} use:link href="/items">Items</a>
<a class:selected={selected.logs} use:link href="/logs">Logs</a> <a class:selected={selected.logs} use:link href="/logs">Logs</a>
</nav> </nav>
@ -36,17 +35,4 @@
a.selected { a.selected {
color: #AAA; color: #AAA;
} }
a.mobile {
display: none;
}
@media screen and (max-width: 600px) {
a.mobile {
display: inline-block;
}
a.desktop {
display: none;
}
}
</style> </style>

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

@ -40,10 +40,10 @@
icon: project.icon, icon: project.icon,
name: project.name, name: project.name,
href: `/projects#${project.id}`, href: `/projects#${project.id}`,
completed: !project.active,
completed: !project.active && project.statusTag === "completed",
items: project.tasks.filter(t => !hideInactive || t.active).map(task => ({ items: project.tasks.filter(t => !hideInactive || t.active).map(task => ({
name: task.name, name: task.name,
completed: !task.active,
completed: !task.active && task.statusTag === "completed",
href: `/projects#${task.id}`, href: `/projects#${task.id}`,
})), })),
}) })

57
svelte-ui/src/pages/ProjectPage.svelte

@ -1,57 +0,0 @@
<script lang="ts">
import Boi from "../components/Boi.svelte";
import Checkbox from "../components/Checkbox.svelte";
import ProjectEntry from "../components/ProjectEntry.svelte";
import RefreshSelection from "../components/RefreshSelection.svelte";
import TableOfContent from "../components/TableOfContent.svelte";
import type { ModalData } from "../stores/modal";
import projectStore from "../stores/project";
const mdProjectAdd: ModalData = {name: "project.add", groupId: null};
let showInactive = ($projectStore.filter.active === null);
$: {
if (showInactive && $projectStore.filter.active === true) {
projectStore.markStale();
}
if (!showInactive && $projectStore.filter.active == null) {
projectStore.markStale();
}
}
$: {
if ($projectStore.stale && !$projectStore.loading) {
projectStore.load({
active: showInactive ? null : true,
});
}
}
</script>
<div class="page">
<div class="options">
<Checkbox centered bind:checked={showInactive} label="Show completed tasks and projects." />
</div>
<TableOfContent hideInactive={!showInactive} projects={$projectStore.projects} />
{#each $projectStore.projects as project (project.id)}
<ProjectEntry hideInactive={!showInactive} showAllOptions project={project} />
{/each}
<Boi open={mdProjectAdd}>Add Project</Boi>
</div>
<RefreshSelection />
<style>
div.page {
display: block;
margin: auto;
max-width: 100%;
width: 640px;
margin-top: 0;
box-sizing: border-box;
}
div.options {
display: flex;
margin: 1em auto;
}
</style>
Loading…
Cancel
Save