WIP: feat: route modals everywhere #2735

Closed
dpschen wants to merge 15 commits from dpschen/frontend:feature/route-modals-everywhere into main
2 changed files with 8 additions and 13 deletions
Showing only changes of commit 440e90230a - Show all commits

View File

@ -13,7 +13,11 @@
/>
<router-link
:to="taskDetailRoute"
:to="{
name: 'task.detail',
params: {id: task.id},
state: { backdropRoutePath: $route.fullPath },
}"
:class="{ 'done': task.done}"
class="tasktext"
>
@ -221,14 +225,6 @@ const currentList = computed(() => {
} : baseStore.currentList
})
const taskDetailRoute = computed(() => ({
name: 'task.detail',
params: {id: task.value.id},
// TODO: re-enable opening task detail in modal
// state: { backdropRoutePath: router.currentRoute.value.fullPath },
}))
async function markAsDone(checked: boolean) {
const updateFunc = async () => {
const newTask = await taskStore.update(task.value)

View File

@ -181,7 +181,7 @@
<script setup lang="ts">
import {toRef, computed, type Ref} from 'vue'
import {useRoute} from 'vue-router'
import {useStorage} from '@vueuse/core'
import ListWrapper from '@/components/list/ListWrapper.vue'
@ -274,15 +274,14 @@ function sort(property: keyof SortBy) {
sortByParam.value = sortBy.value
}
// TODO: re-enable opening task detail in modal
// const router = useRouter()
const route = useRoute()
const taskDetailRoutes = computed(() => Object.fromEntries(
tasks.value.map(({id}) => ([
id,
{
name: 'task.detail',
params: {id},
// state: { backdropRoutePath: router.currentRoute.value.fullPath },
state: { backdropRoutePath: route.fullPath },
},
])),
))