Rename project to pastepass

This commit is contained in:
Vikas
2024-06-02 12:45:39 +05:30
parent f67ceb3d8e
commit e85f5f7923
11 changed files with 16 additions and 31 deletions

2
.gitignore vendored
View File

@@ -26,3 +26,5 @@ go.work.sum
# database
*.boltdb
.idea/

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/v1k45/paste
module github.com/v1k45/pastepass
go 1.22.3

View File

@@ -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() {

View File

@@ -7,7 +7,7 @@ templ base() {
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"/>
<link rel="stylesheet" href="/static/pico.min.css"/>
<title>Paste</title>
</head>
<body>
@@ -15,7 +15,7 @@ templ base() {
<nav>
<ul>
<li>
<a href="/">Paste</a> &mdash; secure one-time paste bin.
<a href="/">PastePass</a> &mdash; secure one-time paste bin.
</li>
</ul>
</nav>
@@ -25,7 +25,7 @@ templ base() {
<footer>
<small>
<p style="color: #8891A4;">
Paste is open-source and free to use. <a href="https://github.com/v1k45/paste">View source on github</a>.
PastePass is open-source and free to use. <a href="https://github.com/v1k45/pastepass">View source on github</a>.
</p>
<p style="color: #8891A4;">
Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server. <br/>
@@ -33,6 +33,7 @@ templ base() {
</small>
</footer>
</main>
<script src="/static/pastepass.js"></script>
</body>
</html>
}

View File

@@ -23,7 +23,7 @@ func base() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta name=\"color-scheme\" content=\"light dark\"><link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css\"><title>Paste</title></head><body><main class=\"container\"><nav><ul><li><a href=\"/\">Paste</a> &mdash; secure one-time paste bin.</li></ul></nav><hr>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta name=\"color-scheme\" content=\"light dark\"><link rel=\"stylesheet\" href=\"/static/pico.min.css\"><title>Paste</title></head><body><main class=\"container\"><nav><ul><li><a href=\"/\">PastePass</a> &mdash; secure one-time paste bin.</li></ul></nav><hr>")
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("<hr><footer><small><p style=\"color: #8891A4;\">Paste is open-source and free to use. <a href=\"https://github.com/v1k45/paste\">View source on github</a>.</p><p style=\"color: #8891A4;\">Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server. <br></p></small></footer></main></body></html>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<hr><footer><small><p style=\"color: #8891A4;\">PastePass is open-source and free to use. <a href=\"https://github.com/v1k45/pastepass\">View source on github</a>.</p><p style=\"color: #8891A4;\">Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server. <br></p></small></footer></main><script src=\"/static/pastepass.js\"></script></body></html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -18,7 +18,6 @@ templ Decrypt(text string) {
<button onclick="copyText(this, '#pastedContent')" data-tooltip="Click to copy">Copy content</button>
</div>
</div>
@copyTextScript()
</div>
}
}

View File

@@ -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("</pre><div><button onclick=\"copyText(this, &#39;#pastedContent&#39;)\" data-tooltip=\"Click to copy\">Copy content</button></div></div>")
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("</div>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</pre><div><button onclick=\"copyText(this, &#39;#pastedContent&#39;)\" data-tooltip=\"Click to copy\">Copy content</button></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -18,7 +18,6 @@ templ PasteSuccess(url string) {
<a href={ templ.SafeURL(url) } style="margin-left: 1rem;">View Paste</a>
</div>
</div>
@copyTextScript()
</div>
}
}

View File

@@ -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</a></div></div>")
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("</div>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"margin-left: 1rem;\">View Paste</a></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -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 {

View File

@@ -6,7 +6,7 @@ import (
"net/http"
"time"
"github.com/v1k45/paste/views"
"github.com/v1k45/pastepass/views"
)
var (