mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 09:02:05 -05:00
- refactor tailscale - update terminal icon - update virtual devices icon - rename some files
48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
import { http } from '@/lib/http.ts';
|
|
|
|
// wake on lan
|
|
export function wol(mac: string) {
|
|
const data = {
|
|
mac
|
|
};
|
|
return http.post('/api/network/wol', data);
|
|
}
|
|
|
|
// get wake-on-lan macs history
|
|
export function getWolMacs() {
|
|
return http.get('/api/network/wol/mac');
|
|
}
|
|
|
|
export function deleteWolMac(mac: string) {
|
|
return http.request({
|
|
method: 'delete',
|
|
url: '/api/network/wol/mac',
|
|
data: { mac }
|
|
});
|
|
}
|
|
|
|
// install tailscale
|
|
export function installTailscale() {
|
|
return http.post('/api/network/tailscale/install');
|
|
}
|
|
|
|
// get tailscale status
|
|
export function getTailscaleStatus() {
|
|
return http.get('/api/network/tailscale/status');
|
|
}
|
|
|
|
// update tailscale status
|
|
export function updateTailscaleStatus(command: 'up' | 'down') {
|
|
return http.post('/api/network/tailscale/status', { command });
|
|
}
|
|
|
|
// login tailscale
|
|
export function loginTailscale() {
|
|
return http.post('/api/network/tailscale/login');
|
|
}
|
|
|
|
// logout tailscale
|
|
export function logoutTailscale() {
|
|
return http.post('/api/network/tailscale/logout');
|
|
}
|