| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>ArduPilot Overlay Manager</title>
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
- <style>
- /* Ensures the body takes up at least the full height of the viewport */
- html, body {
- height: 100%;
- }
- body {
- display: flex;
- flex-direction: column;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
- }
- .content-wrapper {
- flex: 1 0 auto; /* Pushes the footer down */
- }
- .navbar-brand { font-size: 25px; }
- .card { border-radius: 8px; }
- .table-light { background-color: #f8f9fa; }
- footer {
- flex-shrink: 0; /* Prevents footer from shrinking */
- }
- </style>
- </head>
- <body class="bg-light">
- <div class="content-wrapper">
- <nav class="navbar navbar-dark bg-dark shadow-sm py-2">
- <div class="container-fluid px-4">
- <div class="d-flex align-items-center">
- <a class="navbar-brand d-flex align-items-center" href="/">
- <img src="/static/images/ardupilot_logo.png" alt="ArduPilot" height="24" class="d-inline-block align-text-top me-2">
- <span class="text-white">Overlay Manager</span>
- </a>
- </div>
- <div class="ms-auto">
- <a href="javascript:void(0);" onclick="window.location.href = window.location.protocol + '//' + window.location.hostname;" class="btn btn-outline-light">
- <i class="bi bi-arrow-left me-2"></i>Back to Main App
- </a>
- </div>
- </div>
- </nav>
- <div class="container-fluid px-4 mt-4">
- <div class="row mb-4 g-4">
- <div class="col-md-7">
- <div class="card shadow-sm border-0 h-100">
- <div class="card-header bg-white py-3">
- <h5 class="card-title mb-0 fw-bold text-dark">
- <i class="bi bi-cloud-arrow-up-fill me-2 text-info"></i>Upload to Folder
- </h5>
- </div>
- <div class="card-body p-4">
- <form action="/patch-manager/upload" method="post" enctype="multipart/form-data" class="d-flex flex-column gap-3">
- <label class="form-label small fw-bold text-muted mb-0">Select File</label>
- <input class="form-control" type="file" name="file" required>
-
- <label class="form-label small fw-bold text-muted mb-0">Target Directory</label>
- <div class="input-group">
- <span class="input-group-text bg-light"><i class="bi bi-folder2-open"></i></span>
- <select class="form-select" name="target_path">
- {% for d in dirs %}
- <option value="{{ d }}">{% if d == "" %}/ (Root Directory){% else %}{{ d }}{% endif %}</option>
- {% endfor %}
- </select>
- </div>
- <button type="submit" class="btn btn-primary fw-bold mt-2">
- <i class="bi bi-upload me-2"></i>Upload File
- </button>
- </form>
- </div>
- </div>
- </div>
- <div class="col-md-5">
- <div class="card shadow-sm border-0 h-100">
- <div class="card-header bg-white py-3">
- <h5 class="card-title mb-0 fw-bold text-dark">
- <i class="bi bi-folder-plus me-2 text-success"></i>Create New Folder
- </h5>
- </div>
- <div class="card-body p-4">
- <form action="/patch-manager/create_folder" method="post" class="d-flex flex-column gap-3">
- <label class="form-label small fw-bold text-muted mb-0">Folder Path</label>
- <input type="text" class="form-control" name="folder_path" placeholder="e.g., libraries/AP_HAL" required>
- <button type="submit" class="btn btn-success fw-bold mt-2">
- <i class="bi bi-plus-lg me-2"></i>Create Folder
- </button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <div class="card shadow-sm border-0 mb-5">
- <div class="card-header bg-white py-3">
- <h5 class="card-title mb-0 fw-bold text-dark">
- <i class="bi bi-files me-2 text-primary"></i>Managed Files
- </h5>
- </div>
- <div class="card-body p-0">
- <div class="table-responsive">
- <table class="table table-hover align-middle mb-0">
- <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>
- <tbody>
- {% for file in files %}
- <tr>
- <td class="ps-4 font-monospace text-primary" style="font-size: 0.9rem;">{{ file }}</td>
- <td class="text-end pe-4">
- <a href="/patch-manager/edit?filepath={{ file }}" class="btn btn-sm btn-outline-primary me-2">
- <i class="bi bi-pencil me-1"></i> Edit
- </a>
- <form action="/patch-manager/delete" method="post" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this file?');">
- <input type="hidden" name="filepath" value="{{ file }}">
- <button type="submit" class="btn btn-sm btn-outline-danger">
- <i class="bi bi-trash me-1"></i> Delete
- </button>
- </form>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <footer class="py-3 bg-dark text-white-50">
- <div class="container-fluid px-4 d-flex justify-content-between">
- <div>
- <span class="mx-2">Credits:
- <a href="https://github.com/ArduPilot/CustomBuild/graphs/contributors" style="text-decoration: underline; color: white;">See Contributors</a>
- </span>|
- <span class="mx-2">Source:
- <a href="https://git.equalmass.com/Equalmass/ArdupilotCustomFirmwareBuilder" style="text-decoration: underline; color: white;">Ardupilot/CustomBuild</a>
- </span>
- </div>
- <span>ArduPilot Overlay Manager</span>
- </div>
- </footer>
- </body>
- </html>
|