fix: share link

This commit is contained in:
Teajey 2024-05-23 00:41:40 +12:00
parent 4b60cdbcc2
commit ffb27bfd93
Signed by: Teajey
GPG Key ID: 970E790FE834A713
2 changed files with 4 additions and 4 deletions

4
env/env.go vendored
View File

@ -15,11 +15,11 @@ func GuaranteeEnv(key string) (variable string) {
}
var JwtSecret = GuaranteeEnv("LISHWIST_JWT_SECRET")
var HostDomain = GuaranteeEnv("LISHWIST_HOST_DOMAIN")
var HostRootUrl = GuaranteeEnv("LISHWIST_HOST_ROOT_URL")
var HostPort = os.Getenv("LISHWIST_HOST_PORT")
var ServePort = GuaranteeEnv("LISHWIST_SERVE_PORT")
var HostUrl = func() *url.URL {
rawUrl := "http://" + HostDomain
rawUrl := HostRootUrl
if HostPort != "" {
rawUrl += ":" + HostPort
}

View File

@ -2,7 +2,7 @@
<div class="flex-grow-1"></div>
<ul class="navbar-nav">
<li class="nav-item"><button class="btn btn-success"
onclick="navigator.clipboard.writeText('{{.HostUrl}}/{{.Reference}}'); alert('The share link to your wishlist has been copied to your clipboard. Share it with someone!');">Copy
onclick="navigator.clipboard.writeText('{{.HostUrl}}/{{.Reference}}'); alert('The share link to your wishlist has been copied to your clipboard. Anyone with the link will be able to claim gifts for you. Share it with someone!');">Copy
share link</button></li>
<li class="nav-item">
<div class="dropdown">