From d554aa0a50090552c80dca4127540f82b3e78ffd Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 1 Aug 2022 01:08:35 +0400 Subject: [PATCH] Added site address to displayed link. --- web/templates/uploaded.jade | 4 ++-- web/uploaded.jade.mod.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/templates/uploaded.jade b/web/templates/uploaded.jade index ca24ca0..5acc8ca 100644 --- a/web/templates/uploaded.jade +++ b/web/templates/uploaded.jade @@ -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 diff --git a/web/uploaded.jade.mod.go b/web/uploaded.jade.mod.go index dd16bfe..21857cb 100644 --- a/web/uploaded.jade.mod.go +++ b/web/uploaded.jade.mod.go @@ -16,7 +16,7 @@ const ( uploaded__4 = ` hours.
Back to index page
` ) -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) + }