full frontend refactor

This commit is contained in:
2026-01-25 10:26:23 +01:00
parent 317ee96ba3
commit 559a4c3e9f
18 changed files with 2803 additions and 1224 deletions

View File

@@ -60,10 +60,9 @@ defmodule MoundHuntersWeb.TileController do
@doc """
Serve a tile file.
GET /tiles/MOUND/:tile_id.mound
GET /tiles/JPG/:tile_id.jpg
GET /tiles/PNG/:tile_id.jpng
GET /tiles/JSON/:tile_id.json
GET /tiles/mound/:tile_id.mound
GET /tiles/jpg/:tile_id.jpg
GET /tiles/png/:tile_id.jpng
"""
def serve(conn) do
raw_tile_id = conn.path_params["tile_id"]
@@ -81,10 +80,9 @@ defmodule MoundHuntersWeb.TileController do
file_path =
case format do
"MOUND" -> Path.join(tile_dir, "MOUND/#{tile_id}.mound")
"JSON" -> Path.join(tile_dir, "JSON/#{tile_id}.json")
"JPG" -> Path.join(tile_dir, "JPG/#{tile_id}.jpg")
"PNG" -> Path.join(tile_dir, "PNG/#{tile_id}.png")
"mound" -> Path.join(tile_dir, "MOUND/#{tile_id}.mound")
"jpg" -> Path.join(tile_dir, "JPG/#{tile_id}.jpg")
"png" -> Path.join(tile_dir, "PNG/#{tile_id}.png")
end
Logger.info("Tile request started for #{file_path}")