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:
Claude
2025-10-31 16:39:30 +00:00
parent 15cba4cd27
commit 982090d428

View File

@@ -12,7 +12,7 @@
class="task-view"
>
<BaseButton
v-if="!isModal || isMobile"
v-if="!isModal"
class="back-button mbs-2"
@click="lastProject ? router.back() : router.push(projectRoute)"
>
@@ -600,7 +600,7 @@ import {ref, reactive, shallowReactive, computed, watch, nextTick, onMounted, on
import {useRouter, useRoute, type RouteLocation, onBeforeRouteLeave} from 'vue-router'
import {storeToRefs} from 'pinia'
import {useI18n} from 'vue-i18n'
import {unrefElement, useMediaQuery} from '@vueuse/core'
import {unrefElement} from '@vueuse/core'
import {klona} from 'klona/lite'
import {eventToHotkeyString} from '@github/hotkey'
@@ -777,7 +777,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)