wifi with refresh button

This commit is contained in:
saifullah-N
2022-12-24 15:01:05 +05:30
parent d26026095f
commit b423ed9d01

View File

@@ -20,6 +20,11 @@
network: {} as WifiNetwork, network: {} as WifiNetwork,
}; };
function refreshWifi(){
let networkData = GET("network")
networkData.then(value=>processNetworkInfo(value))
}
function getWifiStrengthStyle(network: WifiNetwork) { function getWifiStrengthStyle(network: WifiNetwork) {
const strength = Math.ceil((Number(network.Quality) / 100) * 4); const strength = Math.ceil((Number(network.Quality) / 100) * 4);
@@ -59,7 +64,14 @@
<ChangeHostnameDialog {...changeHostnameDialog} /> <ChangeHostnameDialog {...changeHostnameDialog} />
<div class="admin-network-view"> <div class="admin-network-view">
<h1>Network Info</h1> <div style="display:flex; flex-direction:row; justify-content:space-between" >
<h1>Network Info</h1>
<div style="text-align: center; padding:20px">
<Button on:click={refreshWifi} touch variant="raised">
<Label>Refresh WiFi</Label>
</Button>
</div>
</div>
<div class="pure-form pure-form-aligned"> <div class="pure-form pure-form-aligned">
<div class="pure-control-group"> <div class="pure-control-group">
@@ -212,4 +224,4 @@
} }
} }
} }
</style> </style>