fix: remove duplicate close button on mobile task detail view
When viewing a task in modal mode on mobile, both a back button and a close button were displayed, causing confusion. The back button condition `!isModal || isMobile` meant it would show on mobile even in modal mode. This fix changes the back button to only display when not in modal mode (`!isModal`), ensuring only the close button appears when viewing tasks in a modal on mobile devices. Also removed the now-unused `isMobile` variable and its import.
This commit is contained in:
parent
c6f0d8babe
commit
8a4f3a916f
|
|
@ -13,7 +13,7 @@
|
|||
class="task-view"
|
||||
>
|
||||
<BaseButton
|
||||
v-if="!isModal || isMobile"
|
||||
v-if="!isModal"
|
||||
class="back-button mbs-2"
|
||||
@click="lastProject ? router.back() : router.push(projectRoute)"
|
||||
>
|
||||
|
|
@ -617,7 +617,7 @@ import {ref, reactive, shallowReactive, computed, watch, nextTick, onMounted} fr
|
|||
import {useRouter, useRoute, type RouteLocation, onBeforeRouteLeave} from 'vue-router'
|
||||
import {storeToRefs} from 'pinia'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {unrefElement, useDebounceFn, useElementSize, useIntersectionObserver, useMediaQuery, useMutationObserver} from '@vueuse/core'
|
||||
import {unrefElement, useDebounceFn, useElementSize, useIntersectionObserver, useMutationObserver} from '@vueuse/core'
|
||||
import {klona} from 'klona/lite'
|
||||
|
||||
import TaskService from '@/services/task'
|
||||
|
|
@ -781,7 +781,6 @@ const color = computed(() => {
|
|||
})
|
||||
|
||||
const isModal = computed(() => Boolean(props.backdropView))
|
||||
const isMobile = useMediaQuery('(max-width: 1024px)')
|
||||
|
||||
function attachmentUpload(file: File, onSuccess?: (url: string) => void) {
|
||||
return uploadFile(props.taskId, file, onSuccess)
|
||||
|
|
|
|||
Loading…
Reference in New Issue