diff --git a/.air.toml b/.air.toml
index 4c9eee1..9c6e261 100644
--- a/.air.toml
+++ b/.air.toml
@@ -4,12 +4,12 @@ tmp_dir = "tmp"
[build]
args_bin = []
- bin = "tmp\\main.exe --log true"
+ bin = "tmp/main.exe --log true"
cmd = "go build -o ./tmp/main.exe ."
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata", "uploads"]
exclude_file = []
- exclude_regex = ["_test.go"]
+ exclude_regex = ["_test.go"]git
exclude_unchanged = false
follow_symlink = false
full_bin = ""
diff --git a/app/app.go b/app/app.go
index d0d4340..f1612fd 100644
--- a/app/app.go
+++ b/app/app.go
@@ -12,24 +12,26 @@ var Admin App
type App struct {
http.Server
- Database types.Database
- Cache types.CachingServer
- Storage types.Storage
- Logger *logger.AggregatedLogger
- Mail *email.SmtpServer
+ Database types.Database
+ Cache types.CachingServer
+ Storage types.Storage
+ Encryption types.Encryption
+ Logger *logger.AggregatedLogger
+ Mail *email.SmtpServer
}
-func NewClientServer(addr string, handler http.Handler, logger logger.AggregatedLogger, database types.Database, cache types.CachingServer, storage types.Storage, mail email.SmtpServer) App {
+func NewClientServer(addr string, handler http.Handler, logger logger.AggregatedLogger, database types.Database, cache types.CachingServer, encryption types.Encryption, storage types.Storage, mail email.SmtpServer) App {
return App{
Server: http.Server{
Addr: addr,
Handler: handler,
},
- Storage: storage,
- Logger: &logger,
- Database: database,
- Cache: cache,
- Mail: &mail,
+ Storage: storage,
+ Logger: &logger,
+ Database: database,
+ Encryption: encryption,
+ Cache: cache,
+ Mail: &mail,
}
}
diff --git a/encryption/encryption.go b/encryption/encryption.go
new file mode 100644
index 0000000..5408f40
--- /dev/null
+++ b/encryption/encryption.go
@@ -0,0 +1,76 @@
+package encryption
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/rand"
+ "encoding/base64"
+ "fmt"
+ "github.com/fossyy/filekeeper/types"
+ "github.com/fossyy/filekeeper/utils"
+)
+
+type aesEncryption struct{}
+
+func NewAesEncryption() types.Encryption {
+ return &aesEncryption{}
+}
+
+func (e *aesEncryption) Encrypt(enc string) (string, error) {
+ secret := utils.Getenv("ENCRYPTION_SECRET")
+
+ aesCipher, err := aes.NewCipher([]byte(secret))
+
+ if err != nil {
+ return "", err
+ }
+
+ gcm, err := cipher.NewGCM(aesCipher)
+ if err != nil {
+ return "", err
+ }
+
+ nonce := make([]byte, gcm.NonceSize())
+ _, err = rand.Read(nonce)
+ if err != nil {
+ return "", err
+ }
+
+ ciphertext := gcm.Seal(nonce, nonce, []byte(enc), nil)
+
+ ciphertextBase64 := base64.StdEncoding.EncodeToString(ciphertext)
+
+ return ciphertextBase64, nil
+}
+
+func (e *aesEncryption) Decrypt(dec string) (string, error) {
+ ciphertext, err := base64.StdEncoding.DecodeString(dec)
+ if err != nil {
+ return "", err
+ }
+
+ secret := utils.Getenv("ENCRYPTION_SECRET")
+ if len(secret) != 16 && len(secret) != 24 && len(secret) != 32 {
+ return "", fmt.Errorf("invalid SECRET length: must be 16, 24, or 32 bytes")
+ }
+
+ aesCipher, err := aes.NewCipher([]byte(secret))
+ if err != nil {
+ return "", err
+ }
+
+ gcm, err := cipher.NewGCM(aesCipher)
+ if err != nil {
+ return "", err
+ }
+
+ nonceSize := gcm.NonceSize()
+ nonce, ciphertext := ciphertext[:nonceSize], ciphertext[nonceSize:]
+
+ plaintext, err := gcm.Open(nil, nonce, ciphertext, nil)
+ if err != nil {
+ return "", fmt.Errorf("message authentication failed: %v", err)
+ }
+
+ return string(plaintext), nil
+}
diff --git a/handler/auth/totp/totp.go b/handler/auth/totp/totp.go
index 2508c48..c1ed0b5 100644
--- a/handler/auth/totp/totp.go
+++ b/handler/auth/totp/totp.go
@@ -39,7 +39,12 @@ func POST(w http.ResponseWriter, r *http.Request) {
}
code := r.Form.Get("code")
_, user, key := session.GetSession(r)
- totp := gotp.NewDefaultTOTP(user.Totp)
+ decryptedSecret, err := app.Server.Encryption.Decrypt(user.Totp)
+ if err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ app.Server.Logger.Error(err.Error())
+ }
+ totp := gotp.NewDefaultTOTP(decryptedSecret)
if totp.Verify(code, time.Now().Unix()) {
storeSession := session.Get(key)
diff --git a/handler/user/totp/setup.go b/handler/user/totp/setup.go
index 97c2356..286da2c 100644
--- a/handler/user/totp/setup.go
+++ b/handler/user/totp/setup.go
@@ -82,12 +82,18 @@ func POST(w http.ResponseWriter, r *http.Request) {
}
var component templ.Component
if totp.Verify(code, time.Now().Unix()) {
- if err := app.Server.Database.InitializeTotp(userSession.Email, secret); err != nil {
+ encryptedSecret, err := app.Server.Encryption.Encrypt(secret)
+ if err != nil {
w.WriteHeader(http.StatusInternalServerError)
app.Server.Logger.Error(err.Error())
return
}
- err := app.Server.Cache.RemoveUserCache(r.Context(), userSession.Email)
+ if err := app.Server.Database.InitializeTotp(userSession.Email, encryptedSecret); err != nil {
+ w.WriteHeader(http.StatusInternalServerError)
+ app.Server.Logger.Error(err.Error())
+ return
+ }
+ err = app.Server.Cache.RemoveUserCache(r.Context(), userSession.Email)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
app.Server.Logger.Error(err.Error())
diff --git a/main.go b/main.go
index 83c94a0..4502db3 100644
--- a/main.go
+++ b/main.go
@@ -2,6 +2,8 @@ package main
import (
"fmt"
+ "github.com/fossyy/filekeeper/encryption"
+ "github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/storage"
"strconv"
@@ -9,7 +11,6 @@ import (
"github.com/fossyy/filekeeper/cache"
"github.com/fossyy/filekeeper/db"
"github.com/fossyy/filekeeper/email"
- "github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/middleware"
"github.com/fossyy/filekeeper/routes/admin"
"github.com/fossyy/filekeeper/routes/client"
@@ -42,7 +43,7 @@ func main() {
secretKey := utils.Getenv("S3_SECRET_KEY")
S3 := storage.NewS3(bucket, region, endpoint, accessKey, secretKey)
- app.Server = app.NewClientServer(clientAddr, middleware.Handler(client.SetupRoutes()), *logger.Logger(), database, cacheServer, S3, mailServer)
+ app.Server = app.NewClientServer(clientAddr, middleware.Handler(client.SetupRoutes()), *logger.Logger(), database, cacheServer, encryption.NewAesEncryption(), S3, mailServer)
app.Admin = app.NewAdminServer(adminAddr, middleware.Handler(admin.SetupRoutes()), database)
go func() {
diff --git a/types/types.go b/types/types.go
index c57512f..698594a 100644
--- a/types/types.go
+++ b/types/types.go
@@ -107,3 +107,8 @@ type Storage interface {
Delete(ctx context.Context, key string) error
ListObjects(ctx context.Context, prefix string) ([]string, error)
}
+
+type Encryption interface {
+ Encrypt(enc string) (string, error)
+ Decrypt(dec string) (string, error)
+}
diff --git a/utils/utils.go b/utils/utils.go
index 42b1256..d2305dc 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -119,6 +119,10 @@ func Getenv(key string) string {
val := os.Getenv(key)
env.value[key] = val
+ if val == "" {
+ panic("Asking for env: " + key + " but got nothing, please set your environment first")
+ }
+
return val
}
diff --git a/view/admin/index/index_templ.go b/view/admin/index/index_templ.go
index 25151ff..c01f3b4 100644
--- a/view/admin/index/index_templ.go
+++ b/view/admin/index/index_templ.go
@@ -43,7 +43,7 @@ func Main() templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
System Usage
Real-time metrics for your server.
User List
Manage your registered users.
Name | Email | Role | Actions |
John Doe | john@example.com | Admin | |
Jane Smith | jane@example.com | Editor | |
Bob Johnson | bob@example.com | User | |
Server Control
Manage your server instances.
Server Environment
Manage your server environment variables.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/admin/layout/base_templ.go b/view/admin/layout/base_templ.go
index 4498e7a..4bf7b49 100644
--- a/view/admin/layout/base_templ.go
+++ b/view/admin/layout/base_templ.go
@@ -29,7 +29,7 @@ func Base() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Admin Page")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -37,7 +37,7 @@ func Base() templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/auth/auth_templ.go b/view/client/auth/auth_templ.go
index ebaf1b7..ad4d7b7 100644
--- a/view/client/auth/auth_templ.go
+++ b/view/client/auth/auth_templ.go
@@ -46,7 +46,7 @@ func form(err types.Message, title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Sign Up
Already have an account? Log in
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/auth/forgotPassword/forgotPassword_templ.go b/view/client/auth/forgotPassword/forgotPassword_templ.go
index cb3ba7b..8ea4d88 100644
--- a/view/client/auth/forgotPassword/forgotPassword_templ.go
+++ b/view/client/auth/forgotPassword/forgotPassword_templ.go
@@ -46,13 +46,13 @@ func content(title string, err types.Message) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Forgot Password
Enter your email address and we'll send you instructions to reset your password.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -146,13 +146,13 @@ func NewPasswordForm(title string, err types.Message) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Reset Password
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
switch err.Code {
case 0:
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Error! ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -165,12 +165,12 @@ func NewPasswordForm(title string, err types.Message) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 8)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -217,7 +217,7 @@ func EmailSend(title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Email Verification Sent
We've sent a verification email to your inbox. Please check your email and follow the instructions to change your password.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -264,7 +264,7 @@ func ChangeSuccess(title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Password Changed Successfully
Your password has been successfully updated. Feel free to continue enjoying our platform.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 10)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/auth/signin/signin_templ.go b/view/client/auth/signin/signin_templ.go
index 055767c..78a6113 100644
--- a/view/client/auth/signin/signin_templ.go
+++ b/view/client/auth/signin/signin_templ.go
@@ -46,13 +46,13 @@ func content(err types.Message, title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Login
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
switch err.Code {
case 0:
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Error! ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -65,12 +65,12 @@ func content(err types.Message, title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/auth/signup/signup_templ.go b/view/client/auth/signup/signup_templ.go
index 155ee54..3fa02a6 100644
--- a/view/client/auth/signup/signup_templ.go
+++ b/view/client/auth/signup/signup_templ.go
@@ -46,13 +46,13 @@ func form(err types.Message, title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Sign Up
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
switch err.Code {
case 0:
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Error! ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -65,12 +65,12 @@ func form(err types.Message, title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Already have an account? Log in
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -146,7 +146,7 @@ func EmailSend(title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Email Verification Sent
We've sent a verification email to your inbox. Please check your email and follow the instructions to verify your account.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -193,7 +193,7 @@ func VerifySuccess(title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Account Verified
Your account has been successfully verified. You can now access all the features of our platform.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/email/email_templ.go b/view/client/email/email_templ.go
index 0d9f69d..c5ecb4c 100644
--- a/view/client/email/email_templ.go
+++ b/view/client/email/email_templ.go
@@ -29,7 +29,7 @@ func RegistrationEmail(name string, link string) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Email VerificationEmail Verification
Dear ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -42,7 +42,7 @@ func RegistrationEmail(name string, link string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(",
Please verify your email address by clicking the button below:
Verify EmailOr copy and paste this URL into a new tab of your browser:
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -73,7 +73,7 @@ func RegistrationEmail(name string, link string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
If you did not request this verification, please disregard this email.
Thank you,
The Filekeeper Team
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -102,7 +102,7 @@ func ForgotPassword(name string, link string) templ.Component {
templ_7745c5c3_Var6 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Email VerificationPassword Change Request
Dear ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -115,7 +115,7 @@ func ForgotPassword(name string, link string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(",
Please verify your password change request by clicking the button below:
Verify Password ChangeOr copy and paste this URL into a new tab of your browser:
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -146,7 +146,7 @@ func ForgotPassword(name string, link string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
If you did not request this password change, please disregard this email.
Thank you,
The Filekeeper Team
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 10)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/error/error_templ.go b/view/client/error/error_templ.go
index fb030d0..285256e 100644
--- a/view/client/error/error_templ.go
+++ b/view/client/error/error_templ.go
@@ -43,7 +43,7 @@ func NotFound(title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("404 Not Found
The page you are looking for does not exist. It might have been moved or deleted.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -90,7 +90,7 @@ func InternalServerError(title string) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Oops! Something went wrong.
We're sorry, but an internal server error has occurred. Please try again later.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/file/file_templ.go b/view/client/file/file_templ.go
index e541613..01d959a 100644
--- a/view/client/file/file_templ.go
+++ b/view/client/file/file_templ.go
@@ -83,7 +83,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -96,7 +96,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -104,7 +104,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" BackConfirm Deletion
Are you sure you want to delete the file \"\"? This action cannot be undone.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -112,7 +112,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -129,7 +129,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -146,7 +146,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -163,7 +163,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Share link
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 11)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -180,7 +180,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Share this link with others to grant access to your file.
File is private
Others cannot access or download your file even if you share the link. Make the file public first.
File Name | File Size | Downloads | Status | Action |
| | | | |
| | | | |
| | | | |
File Information Total Files: ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 13)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -202,7 +202,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Total Usage: ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 14)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -215,7 +215,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" Total Allowance: ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 15)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -228,7 +228,7 @@ func MainContent(title string, files []types.FileData, user types.User, allowanc
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 16)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -314,7 +314,7 @@ func JustFile(file types.FileData) templ.Component {
templ_7745c5c3_Var14 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 18)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if !file.Done {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 19)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -340,7 +340,7 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 21)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -366,12 +366,12 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 22)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 23)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -379,7 +379,7 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 25)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -405,12 +405,12 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 26)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 27)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -423,7 +423,7 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 28)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -436,22 +436,22 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 29)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if file.IsPrivate {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 30)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 31)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 32)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -459,7 +459,7 @@ func JustFile(file types.FileData) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" |
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 49)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -631,32 +631,32 @@ func FileIcon(fileType string) templ.Component {
}
ctx = templ.ClearChildren(ctx)
if fileType == "jpg" || fileType == "jpeg" || fileType == "png" || fileType == "gif" || fileType == "bmp" || fileType == "tiff" {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 50)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else if fileType == "pdf" || fileType == "doc" || fileType == "docx" || fileType == "txt" || fileType == "odt" || fileType == "xls" || fileType == "xlsx" || fileType == "ppt" || fileType == "pptx" {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 51)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else if fileType == "zip" || fileType == "rar" || fileType == "tar" || fileType == "gz" || fileType == "7z" || fileType == "bz2" {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 52)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else if fileType == "exe" || fileType == "bin" || fileType == "sh" || fileType == "bat" || fileType == "cmd" || fileType == "msi" {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 53)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else if fileType == "apk" {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 54)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 55)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/index/index_templ.go b/view/client/index/index_templ.go
index 67c0c31..6875c4e 100644
--- a/view/client/index/index_templ.go
+++ b/view/client/index/index_templ.go
@@ -46,7 +46,7 @@ func content(title string, user types.User) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -54,37 +54,37 @@ func content(title string, user types.User) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Your files, always within reach
Store, access, and manage your files with ease. Filekeeper offers generous storage and seamless access from any device, completely free.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if user.Authenticated {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Open Dashboard")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Sign up for free")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Easy Access
Access your files with just a few clicks, anytime you need them.
Generous Storage
Store all your important files with our spacious free storage.
Access Anywhere
Use Filekeeper on any device - computer, tablet, or smartphone.
Secure Storage
Rest easy knowing your files are stored securely in the cloud.
Why choose Filekeeper?
- Completely free to use
- Intuitive and user-friendly interface
- Generous storage space for all your files
- Access your files from any device, anywhere
- Robust file organization and search capabilities
- Dedicated customer support team
Get Started with Filekeeper
Join Filekeeper today and experience hassle-free file management - no credit card required!
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if user.Authenticated {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Open Dashboard")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Create your free account")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 8)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -92,7 +92,7 @@ func content(title string, user types.User) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/layout/base_templ.go b/view/client/layout/base_templ.go
index 8af3413..b7c6a5f 100644
--- a/view/client/layout/base_templ.go
+++ b/view/client/layout/base_templ.go
@@ -31,7 +31,7 @@ func Base(title string) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -44,7 +44,7 @@ func Base(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -52,7 +52,7 @@ func Base(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -60,7 +60,7 @@ func Base(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -72,7 +72,7 @@ func Base(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -101,7 +101,7 @@ func BaseAuth(title string) templ.Component {
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -114,7 +114,7 @@ func BaseAuth(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -122,7 +122,7 @@ func BaseAuth(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 8)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -130,7 +130,7 @@ func BaseAuth(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -146,7 +146,7 @@ func BaseAuth(title string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 10)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -175,7 +175,7 @@ func modal() templ.Component {
templ_7745c5c3_Var5 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Modal Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 11)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -204,7 +204,7 @@ func uploadBox() templ.Component {
templ_7745c5c3_Var6 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 12)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -233,7 +233,7 @@ func MainScript() templ.Component {
templ_7745c5c3_Var7 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 13)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -262,7 +262,7 @@ func modalScript() templ.Component {
templ_7745c5c3_Var8 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 14)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -291,12 +291,12 @@ func Navbar(user types.User) templ.Component {
templ_7745c5c3_Var9 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 15)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if user.Authenticated {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 16)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -309,7 +309,7 @@ func Navbar(user types.User) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 17)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -322,17 +322,17 @@ func Navbar(user types.User) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 18)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Sign up Sign in")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 19)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 20)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -361,7 +361,7 @@ func Footer() templ.Component {
templ_7745c5c3_Var12 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 21)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/totp/totp_templ.go b/view/client/totp/totp_templ.go
index bc069fc..d1528be 100644
--- a/view/client/totp/totp_templ.go
+++ b/view/client/totp/totp_templ.go
@@ -46,13 +46,13 @@ func content(title string, msg types.Message) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/user/totp/setup_templ.go b/view/client/user/totp/setup_templ.go
index 94ad502..a4c06c9 100644
--- a/view/client/user/totp/setup_templ.go
+++ b/view/client/user/totp/setup_templ.go
@@ -81,7 +81,7 @@ func MainContent(title string, qrcode string, code string, user types.User, msg
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -94,7 +94,7 @@ func MainContent(title string, qrcode string, code string, user types.User, msg
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -102,13 +102,13 @@ func MainContent(title string, qrcode string, code string, user types.User, msg
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" BackSet up Two-Factor Authentication
Secure your account with time-based one-time passwords (TOTP).
Here's how to set up the Google Authenticator app:
- Download the Google Authenticator app on your mobile device.
- Open the app and tap \"Begin Setup\".
- Select \"Scan a barcode\" and point your camera at the QR code below.
- The app will automatically add your account and display a 6-digit code.
- Enter this code on the website to complete the setup.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 3)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
switch msg.Code {
case 0:
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
InfoError! ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 4)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -121,12 +121,12 @@ func MainContent(title string, qrcode string, code string, user types.User, msg
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
case 1:
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
InfoSuccess! ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 6)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -139,12 +139,12 @@ func MainContent(title string, qrcode string, code string, user types.User, msg
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Backup Code:
----|----
TOTP Secret:
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -170,7 +170,7 @@ func MainContent(title string, qrcode string, code string, user types.User, msg
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 11)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/view/client/user/user_templ.go b/view/client/user/user_templ.go
index 7e6de9e..5ba3b99 100644
--- a/view/client/user/user_templ.go
+++ b/view/client/user/user_templ.go
@@ -82,7 +82,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
templ_7745c5c3_Var3 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -95,7 +95,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -103,7 +103,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Session Management
Setup IP Address | Browser | Device | Actions |
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 5)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, session := range ListSession {
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 7)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -160,7 +160,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 8)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -173,7 +173,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 9)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -186,7 +186,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" | |
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 12)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Reset Password
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 13)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
switch message.Code {
case 0:
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 14)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -236,12 +236,12 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 15)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Click to log out or terminate the current session.
")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 16)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -254,7 +254,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" / ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 17)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -267,7 +267,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
ManageUpgrade Storage
Pro Plan
50GB of storage for $9.99/month
UpgradeEnterprise Plan
1TB of storage for $49.99/month
Upgrade ")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 18)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -279,7 +279,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 19)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -287,7 +287,7 @@ func MainContent(title string, user types.User, allowance *types.Allowance, List
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 20)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}