2026-03-09 07:43:12 +00:00
|
|
|
<template>
|
|
|
|
|
<div class="pb-16 md:pb-4">
|
2026-07-16 22:16:58 -04:00
|
|
|
<BackButton :label="backLabel" desktop-margin="mb-6" @click="goBack" />
|
2026-03-09 07:43:12 +00:00
|
|
|
|
|
|
|
|
<h1 class="text-2xl font-bold text-white mb-6">Lightning Channels</h1>
|
|
|
|
|
|
2026-07-10 15:21:34 +01:00
|
|
|
<LightningChannelsPanel />
|
2026-03-09 07:43:12 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-07-16 22:16:58 -04:00
|
|
|
import { computed } from 'vue'
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
import BackButton from '@/components/BackButton.vue'
|
2026-07-10 15:21:34 +01:00
|
|
|
import LightningChannelsPanel from '@/components/LightningChannelsPanel.vue'
|
2026-03-09 07:43:12 +00:00
|
|
|
|
2026-07-16 22:16:58 -04:00
|
|
|
const route = useRoute()
|
2026-03-09 07:43:12 +00:00
|
|
|
const router = useRouter()
|
2026-07-16 22:16:58 -04:00
|
|
|
|
|
|
|
|
// When a setup wizard sent us here (?from=goal&goal=<id>), back returns to it.
|
|
|
|
|
const fromGoalId = computed(() =>
|
|
|
|
|
route.query.from === 'goal' && typeof route.query.goal === 'string' ? route.query.goal : null,
|
|
|
|
|
)
|
|
|
|
|
const backLabel = computed(() => (fromGoalId.value ? 'Back to Setup' : 'Back to LND'))
|
|
|
|
|
|
|
|
|
|
function goBack() {
|
|
|
|
|
if (fromGoalId.value) {
|
|
|
|
|
router.push(`/dashboard/goals/${fromGoalId.value}`)
|
|
|
|
|
} else {
|
|
|
|
|
router.replace('/dashboard/apps/lnd')
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-09 07:43:12 +00:00
|
|
|
</script>
|