logigate/app/pages/p/[id].vue

12 lines
379 B
Vue

<script setup lang="ts">
// A share link: /p/<id> opens that project (or your own copy of it).
const route = useRoute()
const ed = useEditor()
// Only when the app was loaded with it: going back or forward to it later just shows that entry.
onMounted(() => (ed.firstPage() ? ed.openLink(String(route.params.id)) : ed.syncUrl()))
</script>
<template>
<EditorApp />
</template>