@page "/admin/tilemaps/edit" @model TileMaps.EditModel @using DataServer.Data.Entities @{ ViewData["Title"] = Model.Sheet.Id == 0 ? "New TileMap Sheet" : $"Edit: {Model.Sheet.Name}"; // Build image URL - handle both with and without /downloads/ path var imageUrl = Model.Sheet.CdnPath; if (!string.IsNullOrEmpty(imageUrl)) { if (!imageUrl.StartsWith("http")) { // Ensure proper CDN URL construction var baseUrl = Model.CdnBaseUrl.TrimEnd('/'); if (!baseUrl.EndsWith("/downloads")) { baseUrl += "/downloads"; } imageUrl = $"{baseUrl}/{imageUrl.TrimStart('/')}"; } } }
@if (!string.IsNullOrEmpty(Model.Message)) {Grid: @Model.Sheet.Columns × @Model.Sheet.Rows = @Model.Sheet.TotalTiles tiles
URL: @imageUrl
} else {To use tiles from this sheet, create Tile Templates which define walkability, sockets, and other properties.