add mobile check for front page project link.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import type { ProjectResult } from "../models/project";
|
||||
import type { TaskResult } from "../models/task";
|
||||
import type { ModalData } from "../stores/modal";
|
||||
import IS_MOBILE from "../utils/phone-check";
|
||||
import Option from "./Option.svelte";
|
||||
import OptionRow from "./OptionRow.svelte";
|
||||
import ParentEntry from "./ParentEntry.svelte";
|
||||
@@ -19,7 +20,7 @@
|
||||
let mdAddTask: ModalData;
|
||||
let mdProjectEdit: ModalData;
|
||||
let mdProjectDelete: ModalData;
|
||||
|
||||
let linkTarget: string = "";
|
||||
let activeTasks: TaskResult[] = [];
|
||||
let inactiveTasks: TaskResult[] = [];
|
||||
let todoTasks: TaskResult[] = [];
|
||||
@@ -43,13 +44,15 @@
|
||||
|
||||
nonHiddenTasks = [...activeTasks, ...todoTasks, ...onholdTasks];
|
||||
}
|
||||
|
||||
$: linkTarget = IS_MOBILE ? `/questlog#${project.id}` : `/projects#${project.id}`
|
||||
</script>
|
||||
|
||||
<StatusColor affects="project" entry={project}>
|
||||
<ParentEntry
|
||||
full={showAllOptions}
|
||||
entry={project}
|
||||
headerLink={linkProject ? "/projects#"+project.id : ""}
|
||||
headerLink={linkProject ? linkTarget : ""}
|
||||
hideProgress={hideProgress}
|
||||
hideIcon={hideIcon}
|
||||
showTimeProgress={!hideProgress}
|
||||
|
||||
Reference in New Issue
Block a user