show notes and delisted status

This commit is contained in:
pluja 2024-05-07 23:04:31 +02:00
parent 897b2c148d
commit 470210b938
No known key found for this signature in database
2 changed files with 121 additions and 97 deletions

View File

@ -31,6 +31,7 @@ type Service struct {
Fiat bool `json:"fiat"`
Cash bool `json:"cash"`
Lightning bool `json:"lightning"`
Notes []string `json:"notes"`
}
type TosReview struct {

View File

@ -3,10 +3,9 @@
<link rel="stylesheet" href="/static/css/cactus.css" type="text/css">
</head>
<section class="p-2 mt-8 mb-2">
<section class="flex flex-col justify-center items-center p-2 my-4 mt-8 mb-2 space-y-4 font-bold text-md md:text-md">
<!-- Pending Approval Notice -->
{{if .Service.Pending}}
<div class="flex justify-center items-center my-4 font-bold text-md md:text-md">
<div class="flex justify-center items-center">
<a href="#" target="_blank" class="flex justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-yellow-500 rounded border border-yellow-600 transition duration-300 bg-zinc-900 hover:border-yellow-600 hover:text-yellow-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-yellow-600 tabler-alert" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
@ -18,9 +17,38 @@
<span>Pending approval</span>
</a>
</div>
{{end}}
<!-- Not Listed Notice -->
{{if and (not .Service.Pending) (not .Service.Listed)}}
<div class="flex justify-center items-center">
<a href="#" target="_blank"
class="flex justify-center items-center px-2 py-1 m-1 space-x-2 text-center text-yellow-500 rounded border border-yellow-600 transition duration-300 bg-zinc-900 hover:border-yellow-600 hover:text-yellow-600">
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-yellow-600 tabler-alert" width="24" height="24"
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="12" r="9"></circle>
<line x1="12" y1="8" x2="12" y2="12"></line>
<line x1="12" y1="16" x2="12.01" y2="16"></line>
</svg>
<span>DELISTED</span>
</a>
</div>
{{end}}
<!-- Display Service Notes -->
{{if not (eq (len .Service.Notes) 0)}}
{{range .Service.Notes}}
{{if ne . ""}}
<p class="p-4 max-w-lg text-sm rounded-lg border md:text-base border-yellow-400/20 bg-yellow-500/10">
{{.}}
</p>
{{end}}
{{end}}
{{end}}
<!-- Service Header -->
<div class="flex justify-center items-center space-x-4">
<img class="rounded-full size-10 md:size-14 bg-white/25" src="/api/g/picture/{{.Service.ID}}" alt="" />
@ -42,7 +70,6 @@
</div>
<!-- Links -->
<div class="flex justify-center items-center mt-4 text-sm font-bold md:text-md">
<div class="flex flex-wrap justify-center items-center space-x-2">
{{if ne (len .Service.Urls) 0}}
<div class="inline-flex">
@ -137,7 +164,7 @@
</svg>
</a>
</div>
</div>
<!-- Usage Guide Button -->
<!--<div class="flex flex-col justify-center items-center my-1 text-sm">
@ -156,14 +183,10 @@
</div>-->
<!-- Icons -->
<div class="flex justify-center items-center mt-2 mb-4">
<a href="/about#icons" class="max-w-md text-xs"> {{partial "partials/service_icons" .Service}} </a>
</div>
<!-- Description -->
<div class="flex justify-center items-center mt-4">
<p class="p-4 max-w-lg text-sm rounded-lg border md:text-base border-white/20 bg-gray-500/10">{{if ne .Service.Description ""}} {{.Service.Description | safe}} {{else}} This {{.Service.Type}} does not have a description. {{end}}</p>
</div>
</section>
<!-- KYC Level -->