Вынес превью на отдельную страницу

This commit is contained in:
Ilia Miheev
2026-06-02 20:28:15 +03:00
parent fd7408016f
commit 41febc9b4b
9 changed files with 602 additions and 547 deletions
+23
View File
@@ -0,0 +1,23 @@
<script setup>
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import CodeView from '@/components/CodeView.vue'
import { useFlightCode } from '@/composables/useFlightCode'
const router = useRouter()
const { finallyText } = useFlightCode()
onMounted(() => {
if (!finallyText.value.trim()) {
router.replace({ name: 'planner' })
}
})
function goBack() {
router.push({ name: 'planner' })
}
</script>
<template>
<CodeView v-if="finallyText" :code="finallyText" @back="goBack" />
</template>