7 Commits

6 changed files with 16 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ import (
"golang.org/x/mod/semver" "golang.org/x/mod/semver"
) )
const Tag = "v0.0.23" const Tag = "v0.0.26"
var versionInfo struct { var versionInfo struct {
Local struct { Local struct {
@@ -55,7 +55,7 @@ func UpdateVersionInfo() {
rels, _, err := client.Repositories.ListReleases(context.Background(), "tardisx", "linkwallet", nil) rels, _, err := client.Repositories.ListReleases(context.Background(), "tardisx", "linkwallet", nil)
if err != nil { if err != nil {
panic(err) return
} }
if len(rels) == 0 { if len(rels) == 0 {
return return

View File

@@ -1,7 +1,7 @@
<div class="large-8 medium-8 cell" id="add-url-form" > <div class="large-8 medium-8 cell" id="add-url-form" >
<div> <div>
<h5 style="display:inline-block;">Add a new URL</h5> <h5 style="display:inline-block;">Add a new URL</h5>
<p style="display:inline-block;">[<a hx-get="/bulk_add" hx-target="#add-url-form" href="#">bulk add</a>]</h5> <div style="display:inline-block;">[<a hx-get="/bulk_add" hx-swap="outerHTML" hx-target="#add-url-form" href="#">bulk add</a>]</div></h5>
</div> </div>
<form onsubmit="return false"> <form onsubmit="return false">

View File

@@ -1,14 +1,13 @@
<div class="large-8 medium-8 cell" id="add-url-form" > <div class="large-8 medium-8 cell" id="add-url-form" >
<div> <div>
<h5 style="display:inline-block;">Add bulk URLs</h5> <h5 style="display:inline-block;">Add bulk URLs</h5>
<p style="display:inline-block;">[<a hx-get="/single_add" hx-target="#add-url-form" href="#">single add</a>]</h5> <p style="display:inline-block;">[<a hx-get="/single_add" hx-swap="outerHTML" hx-target="#add-url-form" href="#">single add</a>]</h5>
</div> <form onsubmit="return false"> </div>
<form onsubmit="return false">
<div class="grid-x grid-padding-x"> <div class="grid-x grid-padding-x">
<div class="large-12 cell"> <div class="large-12 cell">
<label>Paste URL's, one per line</label> <label>Paste URL's, one per line</label>
<textarea type="text" name="urls" rows="10" <textarea type="text" name="urls" rows="10"></textarea>
></textarea>
</div> </div>
</div> </div>
<button <button

View File

@@ -1,3 +1,3 @@
<th hx-post="/manage/results?sort={{ .URLString }}" hx-target="#manage-results">{{ .Name }}&nbsp;{{ .TitleArrow }} <th class="{{ .Class }}" hx-post="/manage/results?sort={{ .URLString }}" hx-target="#manage-results">{{ .Name }}&nbsp;{{ .TitleArrow }}
</th> </th>

View File

@@ -3,7 +3,7 @@
<div class="small-9 medium-10 large-5 cell" <div class="small-9 medium-10 large-5 cell"
hx-post="/tags" hx-post="/tags"
hx-target="#label-widget" hx-target="#label-widget"
hx-trigger="change"> hx-trigger="change queue:first">
<label for="tag-entry" <label for="tag-entry"
class="">Tags</label> class="">Tags</label>

View File

@@ -46,6 +46,7 @@ type ColumnInfo struct {
Name string Name string
Param string Param string
Sorted string Sorted string
Class string
} }
func (c ColumnInfo) URLString() string { func (c ColumnInfo) URLString() string {
@@ -123,8 +124,8 @@ func Create(bmm *db.BookmarkManager, cmm *db.ConfigManager) *Server {
meta := gin.H{"config": config, "bookmarks": allBookmarks} meta := gin.H{"config": config, "bookmarks": allBookmarks}
colTitle := &ColumnInfo{Name: "Title/URL", Param: "title"} colTitle := &ColumnInfo{Name: "Title/URL", Param: "title"}
colCreated := &ColumnInfo{Name: "Created", Param: "created"} colCreated := &ColumnInfo{Name: "Created", Param: "created", Class: "show-for-large"}
colScraped := &ColumnInfo{Name: "Scraped", Param: "scraped"} colScraped := &ColumnInfo{Name: "Scraped", Param: "scraped", Class: "show-for-large"}
if sort == "title" { if sort == "title" {
colTitle.Sorted = "asc" colTitle.Sorted = "asc"
} }
@@ -401,7 +402,10 @@ func cleanupTags(tags []string) []string {
keys := make(map[string]struct{}) keys := make(map[string]struct{})
for _, k := range tags { for _, k := range tags {
if k != "" && k != "|" { if k != "" && k != "|" {
keys[strings.ToLower(k)] = struct{}{} for _, subKey := range strings.Split(k, ",") {
subKey := strings.Trim(subKey, " ")
keys[strings.ToLower(subKey)] = struct{}{}
}
} }
} }
out := []string{} out := []string{}