feat(ui): app sessions overlay the current page in every display mode
Launching an app (or opening a tx in mempool from Home/wallet/channels) used to router.push the app-session page in overlay/fullscreen modes, swapping the page underneath — confusing and lossy. All display modes are now store-driven: panel renders beside the page, overlay/fullscreen render above it (teleported to body), and the route never changes. Deep-link paths (/tx/<hash>) ride along via the launcher's panelPath instead of a route query; closing always returns exactly where the user was. The app-session route stays for direct links. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,9 +75,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import BaseModal from '@/components/BaseModal.vue'
|
||||
import { useAppLauncherStore } from '@/stores/appLauncher'
|
||||
|
||||
interface WalletTransaction {
|
||||
tx_hash: string
|
||||
@@ -100,7 +100,6 @@ defineProps<{
|
||||
|
||||
const emit = defineEmits<{ close: [] }>()
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
|
||||
function close() {
|
||||
emit('close')
|
||||
@@ -120,7 +119,8 @@ function kindLabel(tx: WalletTransaction): string {
|
||||
|
||||
function openInMempool(tx: WalletTransaction) {
|
||||
if (!isOnchain(tx)) return
|
||||
router.push({ name: 'app-session', params: { appId: 'mempool' }, query: { path: `/tx/${tx.tx_hash}` } })
|
||||
// Overlay the explorer above the current page — never navigate away.
|
||||
useAppLauncherStore().openSession('mempool', { path: `/tx/${tx.tx_hash}` })
|
||||
}
|
||||
|
||||
function formatTxTime(timestamp: number): string {
|
||||
|
||||
Reference in New Issue
Block a user