1
0

Added site address to displayed link.

This commit is contained in:
Alexander Andreev 2022-08-01 01:08:35 +04:00
parent 44cfddd31d
commit d554aa0a50
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
:go:func Uploaded(mainSite, downloadLink string, keepForHours int)
:go:func Uploaded(mainSite, site, downloadLink string, keepForHours int)
include base.jade
@ -9,7 +9,7 @@ block append body
section#file
h2 Your link
center
a(href=downloadLink) #{downloadLink}
a(href=downloadLink) #{site}#{downloadLink}
center It will be available for next #{keepForHours} hours.
center
a(href="/") Back to index page

View File

@ -16,7 +16,7 @@ const (
uploaded__4 = ` hours.</center><center><a href="/">Back to index page</a></center></section><footer>2022 Arav &lt;<a href="mailto:me@arav.top">me@arav.top</a>&gt;</footer></body></html>`
)
func Uploaded(mainSite, downloadLink string, keepForHours int, wr io.Writer) {
func Uploaded(mainSite, site, downloadLink string, keepForHours int, wr io.Writer) {
buffer := &WriterAsBuffer{wr}
buffer.WriteString(uploaded__0)
@ -24,8 +24,10 @@ func Uploaded(mainSite, downloadLink string, keepForHours int, wr io.Writer) {
buffer.WriteString(uploaded__1)
buffer.WriteString(html.EscapeString(downloadLink))
buffer.WriteString(uploaded__2)
buffer.WriteString(html.EscapeString(site))
buffer.WriteString(html.EscapeString(downloadLink))
buffer.WriteString(uploaded__3)
buffer.WriteString(html.EscapeString(strconv.FormatInt(int64(keepForHours), 10)))
buffer.WriteString(uploaded__4)
}