fix(ui): wire up OpenWrtGateway's back button
BackButton is presentational-only (emits click, parent wires navigation) per its own doc comment, but OpenWrtGateway.vue rendered it with no @click handler at all -- clicking it did nothing. Added useRouter + goBack() (-> the 'server' route, matching the page's location under views/server/), same pattern as PeerFiles.vue/CloudFolder.vue. Router-detection (openwrt.scan) spot-checked live: RPC plumbing works end-to-end and returns a valid response, but no physical OpenWrt device was on hand to confirm a true-positive detection. Also noted: detect::scan_subnet does blocking TCP/SSH calls inside an async fn with no .await points -- not proven to cause a real issue yet, but worth hardening (spawn_blocking or async I/O) before a large subnet scan is exercised for real. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
7a7fec21d4
commit
7d7ba5734a
@ -1,8 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { rpcClient } from '@/api/rpc-client'
|
||||
import BackButton from '@/components/BackButton.vue'
|
||||
|
||||
const router = useRouter()
|
||||
function goBack() {
|
||||
router.push({ name: 'server' })
|
||||
}
|
||||
|
||||
interface ReleaseInfo {
|
||||
openwrt_release?: string
|
||||
openwrt_version?: string
|
||||
@ -363,7 +369,7 @@ onMounted(() => load())
|
||||
<template>
|
||||
<div class="pb-6">
|
||||
<div class="flex items-center gap-3 mb-6">
|
||||
<BackButton />
|
||||
<BackButton @click="goBack" />
|
||||
<h1 class="text-lg font-semibold text-white">OpenWrt Gateway</h1>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user