feat: enhance restore functionality with nginx restart and countdown dialog

This commit is contained in:
Jacky 2025-03-30 14:02:53 +00:00
parent 4c2487580e
commit 0ca9d84d10
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
19 changed files with 768 additions and 641 deletions

View file

@ -401,16 +401,6 @@ func cleanDirectoryPreservingStructure(dir string) error {
for _, entry := range entries {
path := filepath.Join(dir, entry.Name())
info, err := entry.Info()
if err != nil {
return err
}
// Preserve symlinks - they will be handled separately during restore
if info.Mode()&os.ModeSymlink != 0 {
continue
}
err = os.RemoveAll(path)
if err != nil {
return err

View file

@ -12,7 +12,6 @@ import (
"github.com/0xJacky/Nginx-UI/internal/crypto"
"github.com/gin-gonic/gin"
"github.com/uozi-tech/cosy"
"github.com/uozi-tech/cosy/logger"
)
var (
@ -105,9 +104,6 @@ func EncryptedForm() gin.HandlerFunc {
}
}
logger.Debug("newForm values", newForm.Value)
logger.Debug("newForm files", newForm.File)
// Replace the original form with our modified one
c.Request.MultipartForm = newForm
@ -127,8 +123,6 @@ func EncryptedForm() gin.HandlerFunc {
c.Request.PostForm[k] = v
}
logger.Debug("PostForm after sync", c.Request.PostForm)
c.Next()
}
}