index.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>ArduPilot Overlay Manager</title>
  6. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
  8. <style>
  9. .btn-custom { background-color: #0B61A4; color: white; transition: all 0.2s; }
  10. .btn-custom:hover { background-color: #084b82; color: white; transform: translateY(-1px); }
  11. </style>
  12. </head>
  13. <body class="bg-light">
  14. <nav class="navbar navbar-dark shadow-sm py-2" style="background-color: #0B61A4;">
  15. <div class="container d-flex align-items-center">
  16. <div class="d-flex align-items-center">
  17. <img src="/patch-manager/static/logo.png" alt="ArduPilot Logo" height="35" class="d-inline-block align-text-top me-3">
  18. <span class="navbar-brand mb-0 h4 fw-bold">Overlay Manager</span>
  19. </div>
  20. <div class="ms-auto">
  21. <a href="javascript:void(0);" onclick="window.location.href = window.location.protocol + '//' + window.location.hostname;" class="btn btn-outline-light btn-sm">
  22. <i class="bi bi-arrow-left me-1"></i>Back to Main App
  23. </a>
  24. </div>
  25. </div>
  26. </nav>
  27. <div class="container mt-4">
  28. <div class="card shadow border-0 rounded-3 mb-4">
  29. <div class="card-body p-4">
  30. <h5 class="card-title fw-bold text-secondary mb-3"><i class="bi bi-cloud-arrow-up-fill me-2 text-primary"></i>Inject Custom Source</h5>
  31. <form action="/patch-manager/upload" method="post" enctype="multipart/form-data" class="row g-3">
  32. <div class="col-md-5"><input class="form-control border-primary" type="file" name="file" required></div>
  33. <div class="col-md-5"><input type="text" class="form-control border-primary" name="target_path" placeholder="Path (e.g., libraries/AP_HAL)"></div>
  34. <div class="col-md-2"><button type="submit" class="btn btn-custom w-100 fw-bold">Upload</button></div>
  35. </form>
  36. </div>
  37. </div>
  38. <div class="card shadow border-0 rounded-3">
  39. <div class="card-body p-0">
  40. <table class="table table-hover align-middle mb-0">
  41. <thead class="table-light"><tr><th class="ps-4 py-3">Source Path</th><th class="text-end pe-4 py-3">Actions</th></tr></thead>
  42. <tbody>
  43. {% for file in files %}
  44. <tr>
  45. <td class="ps-4 font-monospace">{{ file }}</td>
  46. <td class="text-end pe-4">
  47. <a href="/patch-manager/edit?filepath={{ file }}" class="btn btn-sm btn-outline-primary me-2"><i class="bi bi-pencil"></i> Edit</a>
  48. <form action="/patch-manager/delete" method="post" class="d-inline" onsubmit="return confirm('Delete this file?');">
  49. <input type="hidden" name="filepath" value="{{ file }}">
  50. <button type="submit" class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i> Delete</button>
  51. </form>
  52. </td>
  53. </tr>
  54. {% endfor %}
  55. </tbody>
  56. </table>
  57. </div>
  58. </div>
  59. </div>
  60. </body>
  61. </html>