fix: correct DNS records, peer dashboard field names, and services API response
- network_manager: api/webui DNS records now point to Caddy (172.20.0.2) instead of their container IPs so Caddy can reverse-proxy correctly - ip_utils: add webui.dev block to generated Caddyfile - config/caddy/Caddyfile: regenerated with webui.dev block - config/dns/Corefile: simplify to single forward zone (remove duplicate) - app.py peer_dashboard: rename peer_name→name, rx_bytes→transfer_rx, tx_bytes→transfer_tx to match PeerDashboard.jsx; add service_urls dict - app.py peer_services: fix DNS (10.0.0.1→real CoreDNS IP), CalDAV URL (radicale.dev:5232→calendar.dev), email structure (flat→nested smtp/imap objects), rename webdav→files, add WireGuard config text, add username field - PeerDashboard.jsx: render service icon links from service_urls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Wifi, ArrowDown, ArrowUp, Clock } from 'lucide-react';
|
||||
import { Wifi, ArrowDown, ArrowUp, Clock, Calendar, FolderOpen, Mail, Globe } from 'lucide-react';
|
||||
import { peerAPI } from '../services/api';
|
||||
|
||||
function formatBytes(bytes) {
|
||||
@@ -114,6 +114,38 @@ export default function PeerDashboard() {
|
||||
|
||||
<div className="card">
|
||||
<h2 className="text-base font-semibold text-gray-900 mb-3">Quick Access</h2>
|
||||
{peer.service_urls && Object.keys(peer.service_urls).length > 0 ? (
|
||||
<div className="grid grid-cols-2 sm:grid-cols-4 gap-3 mb-4">
|
||||
{peer.service_urls.calendar && (
|
||||
<a href={peer.service_urls.calendar} target="_blank" rel="noopener noreferrer"
|
||||
className="flex flex-col items-center gap-1.5 p-3 rounded-lg border border-gray-200 hover:border-primary-400 hover:bg-primary-50 transition-colors text-sm text-gray-700 hover:text-primary-700">
|
||||
<Calendar className="h-6 w-6" />
|
||||
Calendar
|
||||
</a>
|
||||
)}
|
||||
{peer.service_urls.files && (
|
||||
<a href={peer.service_urls.files} target="_blank" rel="noopener noreferrer"
|
||||
className="flex flex-col items-center gap-1.5 p-3 rounded-lg border border-gray-200 hover:border-primary-400 hover:bg-primary-50 transition-colors text-sm text-gray-700 hover:text-primary-700">
|
||||
<FolderOpen className="h-6 w-6" />
|
||||
Files
|
||||
</a>
|
||||
)}
|
||||
{peer.service_urls.mail && (
|
||||
<a href={peer.service_urls.mail} target="_blank" rel="noopener noreferrer"
|
||||
className="flex flex-col items-center gap-1.5 p-3 rounded-lg border border-gray-200 hover:border-primary-400 hover:bg-primary-50 transition-colors text-sm text-gray-700 hover:text-primary-700">
|
||||
<Mail className="h-6 w-6" />
|
||||
Mail
|
||||
</a>
|
||||
)}
|
||||
{peer.service_urls.webdav && (
|
||||
<a href={peer.service_urls.webdav} target="_blank" rel="noopener noreferrer"
|
||||
className="flex flex-col items-center gap-1.5 p-3 rounded-lg border border-gray-200 hover:border-primary-400 hover:bg-primary-50 transition-colors text-sm text-gray-700 hover:text-primary-700">
|
||||
<Globe className="h-6 w-6" />
|
||||
WebDAV
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
<Link
|
||||
to="/my-services"
|
||||
className="inline-flex items-center gap-2 btn btn-primary"
|
||||
|
||||
Reference in New Issue
Block a user