1
0
Fork 0
mirror of https://github.com/miawinter98/just-short-it.git synced 2024-09-20 01:39:00 +00:00
just-short-it/Pages/Inspect.cshtml

45 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-04-19 14:10:49 +00:00
@page
@using JustShortIt.Model
@model JustShortIt.Pages.InspectModel
@{
ViewData["Title"] = "Inspect";
}
2023-11-18 02:10:37 +00:00
<div class="grid place-items-center h-full">
<div class="w-full md:max-w-lg flex flex-col gap-4">
@if (Model.UrlRedirect is null) {
@if (!string.IsNullOrEmpty(Model.Message)) {
<div class="alert alert-success rounded-sm">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
</svg>
<span>
@Html.Raw(Model.Message)
</span>
<button class="btn btn-square btn-sm btn-ghost" onclick="this.parentElement.remove()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd"/>
</svg>
</button>
</div>
} else {
<h1 class="text-3xl lg:text-5xl text-error text-center">URL not found</h1>
<h2 class="text-2xl lg:text-4xl text-secondary-content text-center">The given ID does not exist, it may have expired or been deleted.</h2>
}
} else {
<dl class="grid grid-cols-2 gap-y-2 text-primary-content">
<dt>ID</dt>
<dd>@Model.UrlRedirect.Id</dd>
<dt>URL-Target</dt>
<dd>@Model.UrlRedirect.Target</dd>
</dl>
2023-04-19 14:10:49 +00:00
2023-11-18 02:10:37 +00:00
<form class="" method="post">
<input type="hidden" asp-for="Id" />
<button type="submit" class="btn btn-error text-base-content">Delete</button>
</form>
}
<a class="btn btn-primary btn-lg min-h-0 h-12 btn-wide self-center" asp-page="Urls">Back to URLs</a>
</div>
</div>