@ -61,7 +61,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "/signup", http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
component := authView.GoogleSetup("Setup page", types.Message{
|
||||
component := authView.GoogleSetup("Filekeeper - Setup Page", types.Message{
|
||||
Code: 3,
|
||||
Message: "",
|
||||
})
|
||||
@ -91,7 +91,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
isValid := utils.ValidatePassword(password)
|
||||
if !isValid {
|
||||
component := authView.GoogleSetup("Setup page", types.Message{
|
||||
component := authView.GoogleSetup("Filekeeper - Setup Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Password is invalid",
|
||||
})
|
||||
@ -115,7 +115,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
err = db.DB.CreateUser(&newUser)
|
||||
if err != nil {
|
||||
component := signupView.Main("Sign up Page", types.Message{
|
||||
component := signupView.Main("Filekeeper - Sign up Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Email or Username has been registered",
|
||||
})
|
||||
|
@ -34,7 +34,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
})
|
||||
}
|
||||
|
||||
component := downloadView.Main("Download Page", filesData)
|
||||
component := downloadView.Main("Filekeeper - Download Page", filesData)
|
||||
err = component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
@ -65,7 +65,7 @@ func init() {
|
||||
}
|
||||
|
||||
func GET(w http.ResponseWriter, r *http.Request) {
|
||||
component := forgotPasswordView.Main("Forgot Password Page", types.Message{
|
||||
component := forgotPasswordView.Main("Filekeeper - Forgot Password Page", types.Message{
|
||||
Code: 3,
|
||||
Message: "",
|
||||
})
|
||||
@ -89,9 +89,9 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
user, err := cache.GetUser(emailForm)
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
component := forgotPasswordView.Main(fmt.Sprintf("Account with this email address %s is not found", emailForm), types.Message{
|
||||
component := forgotPasswordView.Main("Filekeeper - Forgot Password Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "",
|
||||
Message: "Unexpected error has occurred",
|
||||
})
|
||||
err := component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
@ -116,7 +116,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
component := forgotPasswordView.EmailSend("Forgot Password Page")
|
||||
component := forgotPasswordView.EmailSend("Filekeeper - Forgot Password Page")
|
||||
err = component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
@ -33,7 +33,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
component := forgotPasswordView.NewPasswordForm("Forgot Password Page", types.Message{
|
||||
component := forgotPasswordView.NewPasswordForm("Filekeeper - Forgot Password Page", types.Message{
|
||||
Code: 3,
|
||||
Message: "",
|
||||
})
|
||||
@ -66,7 +66,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
password := r.Form.Get("password")
|
||||
isValid := utils.ValidatePassword(password)
|
||||
if !isValid {
|
||||
component := signupView.Main("Sign up Page", types.Message{
|
||||
component := signupView.Main("Filekeeper - Sign up Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Password is invalid",
|
||||
})
|
||||
@ -100,7 +100,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
cache.DeleteUser(data.User.Email)
|
||||
|
||||
component := forgotPasswordView.ChangeSuccess("Forgot Password Page")
|
||||
component := forgotPasswordView.ChangeSuccess("Filekeeper - Forgot Password Page")
|
||||
err = component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
@ -16,7 +16,7 @@ func init() {
|
||||
|
||||
func GET(w http.ResponseWriter, r *http.Request) {
|
||||
_, userSession, _ := session.GetSession(r)
|
||||
component := indexView.Main("main page", userSession)
|
||||
component := indexView.Main("Secure File Hosting - Filekeeper", userSession)
|
||||
err := component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
@ -52,7 +52,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
Message: message,
|
||||
})
|
||||
} else {
|
||||
component = signinView.Main("Sign in Page", types.Message{
|
||||
component = signinView.Main("Filekeeper - Sign in Page", types.Message{
|
||||
Code: 3,
|
||||
Message: "",
|
||||
})
|
||||
@ -77,7 +77,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
password := r.Form.Get("password")
|
||||
userData, err := cache.GetUser(email)
|
||||
if err != nil {
|
||||
component := signinView.Main("Sign in Page", types.Message{
|
||||
component := signinView.Main("Filekeeper - Sign in Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Incorrect Username or Password",
|
||||
})
|
||||
@ -128,7 +128,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, cookie.Value, http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
component := signinView.Main("Sign in Page", types.Message{
|
||||
component := signinView.Main("Filekeeper - Sign in Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Incorrect Username or Password",
|
||||
})
|
||||
|
@ -64,7 +64,7 @@ func init() {
|
||||
}
|
||||
|
||||
func GET(w http.ResponseWriter, r *http.Request) {
|
||||
component := signupView.Main("Sign up Page", types.Message{
|
||||
component := signupView.Main("Filekeeper - Sign up Page", types.Message{
|
||||
Code: 3,
|
||||
Message: "",
|
||||
})
|
||||
@ -88,7 +88,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
password := r.Form.Get("password")
|
||||
isValid := utils.ValidatePassword(password)
|
||||
if !isValid {
|
||||
component := signupView.Main("Sign up Page", types.Message{
|
||||
component := signupView.Main("Filekeeper - Sign up Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Password is invalid",
|
||||
})
|
||||
@ -110,7 +110,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if registered := db.DB.IsUserRegistered(userEmail, username); registered {
|
||||
component := signupView.Main("Sign up Page", types.Message{
|
||||
component := signupView.Main("Filekeeper - Sign up Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Email or Username has been registered",
|
||||
})
|
||||
@ -130,7 +130,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
component := signupView.EmailSend("Sign up Page")
|
||||
component := signupView.EmailSend("Filekeeper - Sign up Page")
|
||||
err = component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
@ -27,7 +27,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
err := db.DB.CreateUser(data.User)
|
||||
if err != nil {
|
||||
component := signupView.Main("Sign up Page", types.Message{
|
||||
component := signupView.Main("Filekeeper - Sign up Page", types.Message{
|
||||
Code: 0,
|
||||
Message: "Email or Username has been registered",
|
||||
})
|
||||
@ -43,7 +43,7 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
delete(signupHandler.VerifyUser, code)
|
||||
delete(signupHandler.VerifyEmail, data.User.Email)
|
||||
|
||||
component := signupView.VerifySuccess("Verify page")
|
||||
component := signupView.VerifySuccess("Filekeeper - Verify Page")
|
||||
|
||||
err = component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
|
@ -19,7 +19,7 @@ func init() {
|
||||
}
|
||||
|
||||
func GET(w http.ResponseWriter, r *http.Request) {
|
||||
component := filesView.Main("upload page")
|
||||
component := filesView.Main("Filekeeper - Upload")
|
||||
if err := component.Render(r.Context(), w); err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
|
@ -17,7 +17,7 @@ func init() {
|
||||
|
||||
func GET(w http.ResponseWriter, r *http.Request) {
|
||||
userSession := r.Context().Value("user").(types.User)
|
||||
component := userView.Main("User Page", userSession, session.GetSessions(userSession.Email))
|
||||
component := userView.Main("Filekeeper - User Page", userSession, session.GetSessions(userSession.Email))
|
||||
err := component.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
@ -38,7 +38,7 @@ templ InternalServerError(title string){
|
||||
@layout.Base(title){
|
||||
<main class="container mx-auto px-4 md:px-6">
|
||||
<div class="flex h-screen w-full flex-col items-center justify-center bg-white">
|
||||
<image class="w-32 md:w-64 lg:w-128" src="/public/InternalServerErrorIcon.svg" alt="brand image" />
|
||||
<image class="w-32 md:w-64 lg:w-128" src="/public/InternalServerErrorIcon.svg" alt="Cute Icon" />
|
||||
<div class="mx-auto max-w-md space-y-4 text-center">
|
||||
<h1 class="text-4xl font-bold tracking-tight text-gray-900">Oops! Something went wrong.</h1>
|
||||
<p class="text-gray-500">
|
||||
|
@ -10,7 +10,7 @@ templ content(title string, user types.User) {
|
||||
<div class="bg-white">
|
||||
@layout.Navbar(user)
|
||||
<main class="container mx-auto px-6 py-16 text-center">
|
||||
<h1 class="text-5xl font-bold text-gray-900 mb-2">Your files, always within reach.</h1>
|
||||
<h1 class="text-5xl font-bold text-gray-900 mb-2">Your files, always within reach</h1>
|
||||
<p class="text-gray-700 text-lg mb-8">
|
||||
Store, access, and share your files from anywhere. We offer secure and reliable file storage, so you can
|
||||
focus on what matters most.
|
||||
|
@ -8,7 +8,7 @@ templ Base(title string){
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content="Store, share, and access your files securely with our file hosting service. Upload, organize, and share documents, images, videos, and more with ease. Sign up now for secure and reliable file hosting." />
|
||||
<meta name="description" content="Secure and reliable file hosting service. Upload, organize, and share your documents, images, videos, and more. Sign up now to keep your files always within reach." />
|
||||
<meta name="keywords" content="file hosting, file sharing, cloud storage, data storage, secure file hosting, filekeeper, drive, mega" />
|
||||
<meta name="author" content="Filekeeper" />
|
||||
<link href="/public/output.css" rel="stylesheet"/>
|
||||
@ -24,7 +24,7 @@ templ Navbar(user types.User) {
|
||||
<header class="flex items-center justify-between border-b border-gray-200 bg-white px-6 py-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<a class="flex items-center gap-2" href="#">
|
||||
<image src="public/brand.svg" width="48" height="48" alt="brand image" />
|
||||
<img src="/public/brand.svg" width="48" height="48" alt="Filekeeper Logo" />
|
||||
<span class="text-lg font-semibold">Filekeeper</span>
|
||||
</a>
|
||||
</div>
|
||||
@ -85,7 +85,7 @@ templ Footer() {
|
||||
<footer class="bg-white p-6 md:p-8 w-full relative bottom-0 border-t border-gray-200 w-full py-8">
|
||||
<div class="container mx-auto flex flex-col items-center justify-between gap-6 md:flex-row">
|
||||
<div class="flex items-center gap-2">
|
||||
<image src="public/brand.svg" width="48" height="48" alt="brand image" />
|
||||
<img src="/public/brand.svg" width="48" height="48" alt="Filekeeper Logo" />
|
||||
<span class="text-lg font-semibold">Filekeeper</span>
|
||||
</div>
|
||||
<nav class="flex flex-wrap items-center justify-center gap-4 text-sm font-medium">
|
||||
|
Reference in New Issue
Block a user