feat: review changes

This commit is contained in:
Dominik Pschenitschni 2021-12-04 17:04:28 +01:00
parent f3358269e5
commit 2db820d926
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
8 changed files with 10 additions and 14 deletions

View File

@ -7,9 +7,5 @@
"video": false, "video": false,
"retries": { "retries": {
"runMode": 2 "runMode": 2
}, }
"testFiles": [
"list/list.spec.js",
"**/*.spec.js"
]
} }

View File

@ -54,8 +54,8 @@ function useRouteWithModal() {
const historyState = computed(() => route.fullPath && window.history.state) const historyState = computed(() => route.fullPath && window.history.state)
const routeWithModal = computed(() => { const routeWithModal = computed(() => {
if (historyState.value.backgroundView) { if (historyState.value.backdropView) {
return router.resolve(historyState.value.backgroundView) return router.resolve(historyState.value.backdropView)
} else { } else {
return route return route
} }
@ -65,7 +65,7 @@ function useRouteWithModal() {
const currentModal = shallowRef(null) const currentModal = shallowRef(null)
watchEffect(() => { watchEffect(() => {
currentModal.value = historyState.value.backgroundView currentModal.value = historyState.value.backdropView
? route.matched[0]?.components.default ? route.matched[0]?.components.default
: null : null
}) })

View File

@ -107,7 +107,7 @@ export default {
return { return {
name: 'task.detail', name: 'task.detail',
params: { id: this.taskEditTask.id }, params: { id: this.taskEditTask.id },
state: { backgroundView: this.$router.currentRoute.value.fullPath }, state: { backdropView: this.$router.currentRoute.value.fullPath },
} }
}, },
}, },

View File

@ -116,7 +116,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'task.detail', name: 'task.detail',
params: { id: this.task.id }, params: { id: this.task.id },
state: { backgroundView: this.$router.currentRoute.value.fullPath }, state: { backdropView: this.$router.currentRoute.value.fullPath },
}) })
}, },
}, },

View File

@ -167,7 +167,7 @@ export default {
return { return {
name: 'task.detail', name: 'task.detail',
params: { id: this.task.id }, params: { id: this.task.id },
state: { backgroundView: this.$router.currentRoute.value.fullPath }, state: { backdropView: this.$router.currentRoute.value.fullPath },
} }
}, },
}, },

View File

@ -21,7 +21,7 @@ export function useTaskList(initTasks) {
const loading = computed(() => taskCollectionService.value.loading) const loading = computed(() => taskCollectionService.value.loading)
const totalPages = computed(() => taskCollectionService.value.totalPages) const totalPages = computed(() => taskCollectionService.value.totalPages)
const tasks = ref([]) const tasks = ref([])
const currentPage = ref(0) const currentPage = ref(0)
const loadedList = ref(null) const loadedList = ref(null)
const searchTerm = ref('') const searchTerm = ref('')

View File

@ -282,7 +282,7 @@ const taskDetailRoutes = computed(() => Object.fromEntries(
{ {
name: 'task.detail', name: 'task.detail',
params: { id }, params: { id },
state: { backgroundView: router.currentRoute.value.fullPath }, state: { backdropView: router.currentRoute.value.fullPath },
}, },
])), ])),
)) ))

View File

@ -124,7 +124,7 @@ async function loadList(listIdToLoad) {
const loadedList = await listService.value.get(list) const loadedList = await listService.value.get(list)
await store.dispatch(CURRENT_LIST, loadedList) await store.dispatch(CURRENT_LIST, loadedList)
} finally { } finally {
loadedListId.value = listId loadedListId.value = listId.value
} }
} }
</script> </script>