Files
AdventureLog/backend/server/templates/base.html
Sean Morley b2ca759358 Enhance API key management, location quick add features, and error handling (#1125)
* Refactor AdventureLog Bot workflow to improve issue validation handling and encapsulate comment and close logic

* feat: add API key management to settings page

- Implemented API key creation, deletion, and display functionality.
- Updated the settings page to fetch and show existing API keys.
- Added UI elements for creating new API keys and copying them to clipboard.
- Enhanced request handling to ensure proper trailing slashes for API endpoints.

* feat: add API Keys documentation and update contributing guidelines

* fix: update appVersion to reflect the latest build

* fix: update @tailwindcss/typography to version 0.5.19

* fix: update @tailwindcss/typography to version 0.5.19

* chore: update dependencies in pnpm-lock.yaml

- dompurify: upgraded from 3.3.1 to 3.3.3
- emoji-picker-element: upgraded from 1.29.0 to 1.29.1
- @sveltejs/adapter-node: updated to use @sveltejs/kit@2.55.0
- @sveltejs/adapter-vercel: updated to use @sveltejs/kit@2.55.0
- @sveltejs/kit: upgraded from 2.53.3 to 2.55.0
- @types/node: upgraded from 22.19.13 to 22.19.15
- autoprefixer: updated postcss version from 8.5.6 to 8.5.8
- baseline-browser-mapping: upgraded from 2.10.0 to 2.10.8
- daisyui: updated postcss version from 8.5.6 to 8.5.8
- prettier-plugin-svelte: upgraded from 3.5.0 to 3.5.1
- svelte-check: updated postcss version from 8.5.6 to 8.5.8
- devalue: upgraded from 5.6.3 to 5.6.4
- electron-to-chromium: upgraded from 1.5.302 to 1.5.313
- caniuse-lite: upgraded from 1.0.30001774 to 1.0.30001780
- mlly: upgraded from 1.8.0 to 1.8.1
- node-releases: upgraded from 2.0.27 to 2.0.36
- tar: upgraded from 7.5.9 to 7.5.11
- tinyexec: upgraded from 1.0.2 to 1.0.4

* fix: update appVersion to include the latest build identifier

* fix: enhance authentication fallback for protected media access

* feat(auth): add 'mobile-qr' to trailing slash list for URL handling

* Translated using Weblate (French)

Currently translated at 99.9% (1091 of 1092 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/fr/

* Translated using Weblate (Korean)

Currently translated at 100.0% (1092 of 1092 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/ko/

* Translated using Weblate (German)

Currently translated at 100.0% (1092 of 1092 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (1092 of 1092 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/sv/

* Added translation using Weblate (Catalan)

* Translated using Weblate (Catalan)

Currently translated at 1.2% (14 of 1092 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/ca/

* Docs: Reorder immich API permissions to natural order (#1086)

* Refactor AdventureLog Bot workflow to improve issue validation handling and encapsulate comment and close logic (#1068)

* Reorder immich API permissions to natural order

---------

Co-authored-by: Sean Morley <git@seanmorley.com>

* Translated using Weblate (Turkish)

Currently translated at 100.0% (1093 of 1093 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/tr/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (1093 of 1093 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/sv/

* Translated using Weblate (German)

Currently translated at 100.0% (1093 of 1093 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

* Add ENABLE_RATE_LIMITS configuration for backend rate limiting

* Set tabindex to -1 for dropdown menus to improve accessibility

* feat: Enhance LocationQuickStart component with quick add functionality and location enrichment

- Added quick add feature for locations with category selection.
- Implemented location description enrichment using Google Maps API.
- Improved search functionality and result handling.
- Introduced new utility functions for location saving and validation.
- Updated UI to reflect changes in location selection and quick add status.
- Added toast notifications for user feedback on actions.
- Refactored existing code for better readability and maintainability.

fix: Ensure finite coordinates in LocationSearchMap component

- Added validation for initial selection coordinates to prevent errors.

chore: Update app version to v0.12.0-main-033126

- Updated versioning in config file.

feat: Create location-save module for handling location data saving

- Implemented saveLocation function to handle both new and existing location data.
- Added utility functions for coordinate formatting and link sanitization.

* fix: Remove unused API keys section from Norwegian and Polish locale files

* fix: typo in backend success response (#1010)

* feat: enhance API key security with PBKDF2 hashing and configurable iterations

* fix: update PR handling to ignore dependabot in addition to maintainer

* fix: improve error handling for image import and permission validation

* fix: format code for better readability in LocationQuickStart component

* Translated using Weblate (Spanish)

Currently translated at 100.0% (1097 of 1097 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/es/

* Translated using Weblate (German)

Currently translated at 99.7% (1094 of 1097 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

* Translated using Weblate (German)

Currently translated at 99.7% (1094 of 1097 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

* fix: update default value for ENABLE_RATE_LIMITS in Docker configuration

* feat(lodging): implement quick start feature for lodging creation

- Added LodgingQuickStart component to facilitate quick lodging entry.
- Integrated Google Maps support for lodging selection and details enrichment.
- Enhanced LodgingModal to include quick start step and handle prefill from Google Places.
- Introduced utility function to infer lodging type from Google Places data.
- Updated localization files to include new strings for quick start functionality.

* fix: correct appVersion to reflect the development version

* fix: theme selector not working on HTTP environment (#1102)

* fix: remove unnecessary trailing comma in secure cookie setting

* Translated using Weblate (German)

Currently translated at 100.0% (1098 of 1098 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/de/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (1098 of 1098 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/es/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (1098 of 1098 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/sv/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (1098 of 1098 strings)

Translation: AdventureLog/Web App
Translate-URL: https://hosted.weblate.org/projects/adventurelog/web-app/tr/

* feat(itinerary): add validation for global and dated itinerary items

* Refactor code structure for improved readability and maintainability

* feat: update serializers and views to handle images and attachments in backup/export processes

* feat(itinerary): implement quick add functionality for locations and lodgings with itinerary date handling

* chore: update Django and Pillow versions in requirements.txt

* fix: update appVersion to reflect the main branch version

* fixes External Mapping Search not using saved GPS coordinate for Loacations
Fixes #1134

---------

Co-authored-by: lesensei <alain-gh@lespeps.eu>
Co-authored-by: Hosted Weblate user 141821 <clearstripe@users.noreply.hosted.weblate.org>
Co-authored-by: Alex <div@alexe.at>
Co-authored-by: AntonPalmqvist <apq@users.noreply.hosted.weblate.org>
Co-authored-by: Marc Llopart <marc@medullar.com>
Co-authored-by: Stephan Zwicknagl <64196842+stephanzwicknagl@users.noreply.github.com>
Co-authored-by: Orhun <orhunavcu@gmail.com>
Co-authored-by: bittin1ddc447d824349b2 <bittin@reimu.nl>
Co-authored-by: Matthias Thym <git@thym.at>
Co-authored-by: Francisco Serrador <fserrador@gmail.com>
Co-authored-by: Johannes Roeßler <adventurelog@joei.de>
Co-authored-by: Gaël <67436391+Pexilo@users.noreply.github.com>
Co-authored-by: MrAsieru <weblate@asier.net>
2026-05-15 22:25:09 -04:00

202 lines
5.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="AdventureLog API Server" />
<link rel="icon" href="/static/favicon.png" />
<meta name="author" content="Sean Morley" />
<title>AdventureLog API Server</title>
<!-- Bootstrap 5 CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<!-- Bootstrap Icons -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css"
rel="stylesheet"
/>
<style>
body {
background-color: #f9f9fb;
color: #222;
font-family: "Segoe UI", sans-serif;
}
.navbar {
background-color: #2c3e50;
}
.navbar-brand,
.nav-link {
color: #ecf0f1 !important;
}
.hero {
padding: 4rem 1rem;
background: linear-gradient(135deg, #2980b9, #6dd5fa);
color: white;
text-align: center;
border-radius: 0 0 1rem 1rem;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
.hero p {
font-size: 1.25rem;
margin-bottom: 2rem;
}
.api-response {
margin-top: 1rem;
font-family: monospace;
background-color: #eef2f7;
padding: 1rem;
border-radius: 0.5rem;
}
footer {
text-align: center;
padding: 2rem 0;
font-size: 0.9rem;
color: #888;
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg">
<div class="container">
<a class="navbar-brand" href="/">AdventureLog API</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
<li class="nav-item">
<a
class="nav-link"
href="http://adventurelog.app"
target="_blank"
>
Documentation
</a>
</li>
<li class="nav-item">
<a
class="nav-link"
href="https://github.com/seanmorley15/AdventureLog"
target="_blank"
>
Source Code
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/docs">API Docs</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<div class="hero">
<div class="container">
<h1><i class="bi bi-map"></i> AdventureLog API</h1>
<p>
The backend powering your travels — flexible, powerful, and open
source.
</p>
<a href="/docs" class="btn btn-light btn-lg shadow-sm"
><i class="bi bi-book"></i> Explore API Docs</a
>
</div>
</div>
<!-- Main Content -->
<div class="container my-5">
{% block content %}
<div class="text-center">
<h2>Try a Sample Request</h2>
<p>Use the form below to test an API POST request.</p>
<form
class="ajax-post d-flex flex-column align-items-center"
action="/api/test"
method="post"
style="max-width: 500px; margin: auto"
>
<input
type="text"
name="example"
placeholder="Enter example data"
class="form-control mb-3"
required
/>
<button type="submit" class="btn btn-primary">
<i class="bi bi-send"></i> Send Request
</button>
</form>
<div class="api-response"></div>
</div>
{% endblock %}
</div>
<footer class="text-center text-muted py-4">
Open source with ❤️ by
<a href="https://seanmorley.com" target="_blank">Sean Morley</a> • View on
<a href="https://github.com/seanmorley15/AdventureLog" target="_blank"
>GitHub</a
>
<a href="https://adventurelog.app" target="_blank">adventurelog.app</a>
</footer>
<!-- Bootstrap JS -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
></script>
<!-- jQuery (optional, used here for legacy script) -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
crossorigin="anonymous"
></script>
<script>
const error_response = (data) => {
$(".api-response").html(
`<strong>API Response:</strong> ${data.status} ${data.statusText}<br/><strong>Content:</strong> ${data.responseText}`
);
};
const success_response = (data) => {
$(".api-response").html(
`<strong>API Response:</strong> OK<br/><strong>Content:</strong> ${JSON.stringify(
data,
null,
2
)}`
);
};
$(document).ready(() => {
$("form.ajax-post button[type=submit]").click(function () {
const form = $("form.ajax-post");
$.post(form.attr("action"), form.serialize())
.fail(error_response)
.done(success_response);
return false;
});
});
</script>
{% block script %}{% endblock %}
</body>
</html>