Add QR code, Add MODT customisation
This commit is contained in:
@@ -2,6 +2,7 @@ package web
|
||||
|
||||
import (
|
||||
"ResendIt/internal/buildinfo"
|
||||
"ResendIt/internal/config"
|
||||
"ResendIt/internal/file"
|
||||
"os"
|
||||
"strconv"
|
||||
@@ -33,6 +34,7 @@ func NewHandler(fileService *file.Service, cfg ConfigService) *Handler {
|
||||
func (h *Handler) Index(c *gin.Context) {
|
||||
c.HTML(200, "index.html", gin.H{
|
||||
"title": "Home",
|
||||
"MODT": h.configService.GetStringDefault(config.KeyModtext, config.DefaultModt),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -50,7 +52,9 @@ func (h *Handler) FileView(c *gin.Context) {
|
||||
|
||||
fileRecord, err := h.fileService.GetFileByViewID(id)
|
||||
if err != nil {
|
||||
c.HTML(404, "error.html", nil)
|
||||
c.HTML(404, "error.html", gin.H{
|
||||
"MODT": h.configService.GetStringDefault(config.KeyModtext, config.DefaultModt),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -58,6 +62,7 @@ func (h *Handler) FileView(c *gin.Context) {
|
||||
deleteKey := fileRecord.DeletionID
|
||||
|
||||
c.HTML(200, "complete.html", gin.H{
|
||||
"MODT": h.configService.GetStringDefault(config.KeyModtext, config.DefaultModt),
|
||||
"Filename": fileRecord.Filename,
|
||||
"DownloadID": downloadKey,
|
||||
"DeleteID": deleteKey,
|
||||
|
||||
Reference in New Issue
Block a user