From e85f5f7923b5043192c78386746d06fd731ee150 Mon Sep 17 00:00:00 2001 From: Vikas Date: Sun, 2 Jun 2024 12:45:39 +0530 Subject: [PATCH] Rename project to pastepass --- .gitignore | 2 ++ go.mod | 2 +- main.go | 4 ++-- views/base.templ | 7 ++++--- views/base_templ.go | 4 ++-- views/decrypt.templ | 1 - views/decrypt_templ.go | 10 +--------- views/paste.templ | 1 - views/paste_templ.go | 10 +--------- web/handlers.go | 4 ++-- web/utils.go | 2 +- 11 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 9ddca92..079f556 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ go.work.sum # database *.boltdb + +.idea/ diff --git a/go.mod b/go.mod index f695249..3e9fd80 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/v1k45/paste +module github.com/v1k45/pastepass go 1.22.3 diff --git a/main.go b/main.go index 211b918..9e0352d 100644 --- a/main.go +++ b/main.go @@ -5,8 +5,8 @@ import ( "net/http" "time" - "github.com/v1k45/paste/db" - "github.com/v1k45/paste/web" + "github.com/v1k45/pastepass/db" + "github.com/v1k45/pastepass/web" ) func main() { diff --git a/views/base.templ b/views/base.templ index a0cf10c..c9ef498 100644 --- a/views/base.templ +++ b/views/base.templ @@ -7,7 +7,7 @@ templ base() { - + Paste @@ -15,7 +15,7 @@ templ base() { @@ -25,7 +25,7 @@ templ base() { + } diff --git a/views/base_templ.go b/views/base_templ.go index 8107157..8a21214 100644 --- a/views/base_templ.go +++ b/views/base_templ.go @@ -23,7 +23,7 @@ func base() templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Paste

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Paste

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -31,7 +31,7 @@ func base() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Paste is open-source and free to use. View source on github.

Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server.

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

PastePass is open-source and free to use. View source on github.

Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/decrypt.templ b/views/decrypt.templ index dd663d0..7e8e08b 100644 --- a/views/decrypt.templ +++ b/views/decrypt.templ @@ -18,7 +18,6 @@ templ Decrypt(text string) { - @copyTextScript() } } diff --git a/views/decrypt_templ.go b/views/decrypt_templ.go index 1ece1ba..ac80039 100644 --- a/views/decrypt_templ.go +++ b/views/decrypt_templ.go @@ -42,15 +42,7 @@ func Decrypt(text string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = copyTextScript().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/views/paste.templ b/views/paste.templ index 499cadc..1ab6e1d 100644 --- a/views/paste.templ +++ b/views/paste.templ @@ -18,7 +18,6 @@ templ PasteSuccess(url string) { View Paste - @copyTextScript() } } \ No newline at end of file diff --git a/views/paste_templ.go b/views/paste_templ.go index a7ee895..084e902 100644 --- a/views/paste_templ.go +++ b/views/paste_templ.go @@ -51,15 +51,7 @@ func PasteSuccess(url string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"margin-left: 1rem;\">View Paste") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = copyTextScript().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"margin-left: 1rem;\">View Paste") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/web/handlers.go b/web/handlers.go index 01339ec..9c56e5a 100644 --- a/web/handlers.go +++ b/web/handlers.go @@ -5,8 +5,8 @@ import ( "fmt" "net/http" - "github.com/v1k45/paste/db" - "github.com/v1k45/paste/views" + "github.com/v1k45/pastepass/db" + "github.com/v1k45/pastepass/views" ) type Handler struct { diff --git a/web/utils.go b/web/utils.go index ff0fd66..78bd8c5 100644 --- a/web/utils.go +++ b/web/utils.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/v1k45/paste/views" + "github.com/v1k45/pastepass/views" ) var (