refactor: move client page view file to client folder and reorganize file structure
This commit is contained in:
@ -9,8 +9,8 @@ import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/types/models"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
authView "github.com/fossyy/filekeeper/view/auth"
|
||||
signupView "github.com/fossyy/filekeeper/view/signup"
|
||||
"github.com/fossyy/filekeeper/view/client/auth"
|
||||
signupView "github.com/fossyy/filekeeper/view/client/signup"
|
||||
"github.com/google/uuid"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
totpView "github.com/fossyy/filekeeper/view/totp"
|
||||
"github.com/fossyy/filekeeper/view/client/totp"
|
||||
"github.com/xlzd/gotp"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
@ -1,13 +1,13 @@
|
||||
package downloadHandler
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/view/client/download"
|
||||
"net/http"
|
||||
|
||||
"github.com/fossyy/filekeeper/db"
|
||||
"github.com/fossyy/filekeeper/logger"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
downloadView "github.com/fossyy/filekeeper/view/download"
|
||||
)
|
||||
|
||||
var log *logger.AggregatedLogger
|
||||
|
@ -2,10 +2,10 @@ package errorHandler
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/fossyy/filekeeper/view/client/error"
|
||||
"net/http"
|
||||
|
||||
"github.com/fossyy/filekeeper/logger"
|
||||
errorView "github.com/fossyy/filekeeper/view/error"
|
||||
)
|
||||
|
||||
var log *logger.AggregatedLogger
|
||||
|
@ -6,6 +6,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fossyy/filekeeper/cache"
|
||||
"github.com/fossyy/filekeeper/view/client/email"
|
||||
"github.com/fossyy/filekeeper/view/client/forgotPassword"
|
||||
"github.com/google/uuid"
|
||||
"net/http"
|
||||
"strconv"
|
||||
@ -17,8 +19,6 @@ import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/types/models"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
emailView "github.com/fossyy/filekeeper/view/email"
|
||||
forgotPasswordView "github.com/fossyy/filekeeper/view/forgotPassword"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
@ -8,9 +8,8 @@ import (
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
forgotPasswordView "github.com/fossyy/filekeeper/view/forgotPassword"
|
||||
signupView "github.com/fossyy/filekeeper/view/signup"
|
||||
|
||||
"github.com/fossyy/filekeeper/view/client/forgotPassword"
|
||||
signupView "github.com/fossyy/filekeeper/view/client/signup"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -2,10 +2,10 @@ package indexHandler
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
"github.com/fossyy/filekeeper/view/client/index"
|
||||
"net/http"
|
||||
|
||||
"github.com/fossyy/filekeeper/logger"
|
||||
indexView "github.com/fossyy/filekeeper/view/index"
|
||||
)
|
||||
|
||||
var log *logger.AggregatedLogger
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
signinView "github.com/fossyy/filekeeper/view/signin"
|
||||
"github.com/fossyy/filekeeper/view/client/signin"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
@ -4,6 +4,8 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/fossyy/filekeeper/view/client/email"
|
||||
signupView "github.com/fossyy/filekeeper/view/client/signup"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"sync"
|
||||
@ -15,8 +17,6 @@ import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/types/models"
|
||||
"github.com/fossyy/filekeeper/utils"
|
||||
emailView "github.com/fossyy/filekeeper/view/email"
|
||||
signupView "github.com/fossyy/filekeeper/view/signup"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
package signupVerifyHandler
|
||||
|
||||
import (
|
||||
signupView "github.com/fossyy/filekeeper/view/client/signup"
|
||||
"net/http"
|
||||
|
||||
"github.com/fossyy/filekeeper/db"
|
||||
signupHandler "github.com/fossyy/filekeeper/handler/signup"
|
||||
"github.com/fossyy/filekeeper/logger"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
signupView "github.com/fossyy/filekeeper/view/signup"
|
||||
)
|
||||
|
||||
var log *logger.AggregatedLogger
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"github.com/fossyy/filekeeper/cache"
|
||||
"github.com/fossyy/filekeeper/logger"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
filesView "github.com/fossyy/filekeeper/view/upload"
|
||||
filesView "github.com/fossyy/filekeeper/view/client/upload"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
|
@ -2,7 +2,7 @@ package userSessionTerminateHandler
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
userView "github.com/fossyy/filekeeper/view/user"
|
||||
"github.com/fossyy/filekeeper/view/client/user"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"github.com/fossyy/filekeeper/cache"
|
||||
userTotpSetupView "github.com/fossyy/filekeeper/view/user/totp"
|
||||
"github.com/fossyy/filekeeper/view/client/user/totp"
|
||||
"image/png"
|
||||
"net/http"
|
||||
"time"
|
||||
|
@ -3,11 +3,11 @@ package userHandler
|
||||
import (
|
||||
"github.com/a-h/templ"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/client/user"
|
||||
"net/http"
|
||||
|
||||
"github.com/fossyy/filekeeper/logger"
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
userView "github.com/fossyy/filekeeper/view/user"
|
||||
)
|
||||
|
||||
var log *logger.AggregatedLogger
|
||||
|
@ -2,7 +2,7 @@ package authView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
)
|
||||
|
||||
templ form(err types.Message, title string) {
|
@ -1,7 +1,7 @@
|
||||
package downloadView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package errorView
|
||||
|
||||
import "github.com/fossyy/filekeeper/view/layout"
|
||||
import "github.com/fossyy/filekeeper/view/client/layout"
|
||||
|
||||
templ NotFound(title string){
|
||||
@layout.Base(title){
|
@ -2,7 +2,7 @@ package forgotPasswordView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
)
|
||||
|
||||
templ content(title string, err types.Message) {
|
@ -2,7 +2,7 @@ package indexView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
)
|
||||
|
||||
templ content(title string, user types.User) {
|
@ -2,7 +2,7 @@ package signinView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
)
|
||||
|
||||
templ content(err types.Message, title string) {
|
@ -2,7 +2,7 @@ package signup
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
)
|
||||
|
||||
templ form(err types.Message, title string) {
|
@ -1,7 +1,7 @@
|
||||
package totpView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package uploadView
|
||||
|
||||
import "github.com/fossyy/filekeeper/view/layout"
|
||||
import "github.com/fossyy/filekeeper/view/client/layout"
|
||||
|
||||
templ content(title string) {
|
||||
@layout.Base(title){
|
@ -1,7 +1,7 @@
|
||||
package userTotpSetupView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ package userView
|
||||
|
||||
import (
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"github.com/fossyy/filekeeper/view/layout"
|
||||
"github.com/fossyy/filekeeper/view/client/layout"
|
||||
"github.com/fossyy/filekeeper/session"
|
||||
)
|
||||
|
Reference in New Issue
Block a user