-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tasks): Make tasks panel responsive (#200)
* refactor: Format class name order in taskItem * feat(taskItem): Tasks are bigger on mobile * refactor(controls): Remove bottom margin * refactor(timerSwitch): Remove width and height modifiers * feat: Add task display component * refactor(tasks): Make task list more mobile friendly * feat(tasks): Show task list on the right on desktop * refactor(timer): Todo manager button is now consistently on the right * feat(todoItem): Make checkbox bigger on mobile * feat(todoDisplay): Make displayed tasks fixed width * feat(tasks): Increase bottom padding on desktop * feat(taskDisplay): Add transitions for displayed tasks * refactor(timer): Remove todoDisplay for now * fix(timer): Make todo manager fixed This mitigates some layout issues caused by scroll bars appearing during absolute positioning * fix(timer): Hide todo manager by default
- Loading branch information
Showing
6 changed files
with
89 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<transition-group class="flex flex-col w-full max-w-sm gap-2 px-4" enter-class="translate-y-2 opacity-0" enter-active-class="transition" leave-to-class="-translate-y-2 opacity-0" leave-active-class="transition"> | ||
<TaskItem | ||
v-for="task in tasks" | ||
:key="task.section + '-' + task.title" | ||
:manage="false" | ||
:draggable="false" | ||
:item="task" | ||
class="!border-l-0" | ||
@input="$store.commit('tasklist/toggleComplete', { item: task })" | ||
@delete="$store.commit('tasklist/delete', { item: task })" | ||
/> | ||
</transition-group> | ||
</template> | ||
|
||
<script> | ||
import Item from './item.vue' | ||
export default { | ||
components: { TaskItem: Item }, | ||
computed: { | ||
tasks: { | ||
get () { | ||
let tasks = this.$store.getters['tasklist/sortedTasks'] | ||
.filter(task => task.section === this.$store.getters['schedule/getCurrentItem'].type) | ||
if (this.$store.state.settings.tasks.maxActiveTasks > 0) { | ||
tasks = tasks.slice(0, this.$store.state.settings.tasks.maxActiveTasks) | ||
} | ||
return tasks | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters