From 00bd7e1f78db12678e817507117352da21acce12 Mon Sep 17 00:00:00 2001 From: Danila Gorelko Date: Wed, 14 Aug 2024 14:03:20 +0300 Subject: [PATCH 1/3] Remove 'Category list' from autocomplete menu (#252) --- static/view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/view.js b/static/view.js index 909a092..78a3996 100644 --- a/static/view.js +++ b/static/view.js @@ -35,7 +35,7 @@ wrapper.appendChild(hamburgerSection); return Array .from(new DOMParser() .parseFromString(html, 'text/html') - .querySelectorAll('.mv-tags .p-name')) + .querySelectorAll('.mv-tag .p-name')) .map(a => a.innerText); }); From ea7d60dd72bf54f100669d83dadb7f98be351396 Mon Sep 17 00:00:00 2001 From: Danila Gorelko Date: Wed, 14 Aug 2024 14:10:03 +0300 Subject: [PATCH 2/3] Trick safari to not recognise any "name" in the input field (#254) Safari looks at id and placeholder in order to enable contacts autocomplete. Fixes: #253 --- categories/view_card.html | 4 ++-- static/default.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/categories/view_card.html b/categories/view_card.html index f2ea7c8..3262154 100644 --- a/categories/view_card.html +++ b/categories/view_card.html @@ -22,8 +22,8 @@ {{if .GivenPermissionToModify}}
  • - + diff --git a/static/default.css b/static/default.css index 10237df..f13975f 100644 --- a/static/default.css +++ b/static/default.css @@ -271,7 +271,7 @@ mark { background: rgba(130, 80, 30, 5); color: inherit; } border: none; background: none; } -.categories-card #_cat-name { +.categories-card #_cat-input { width: 100%; margin: 0; padding: 0 .5rem; From a9ee700aad2133766d06e55df6e8092d6dcaab07 Mon Sep 17 00:00:00 2001 From: Douglas Pi Date: Sun, 25 Aug 2024 20:16:10 +0300 Subject: [PATCH 3/3] Fix Windows slashes --- files/files.go | 2 +- hyphae/files.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/files.go b/files/files.go index 97cafb4..b549e83 100644 --- a/files/files.go +++ b/files/files.go @@ -25,7 +25,7 @@ var paths struct { // A separate function is needed to easily know where a general storage path is // needed rather than a concrete Git or the whole wiki storage path, so that we // could easily refactor things later if we'll ever support different storages. -func HyphaeDir() string { return paths.gitRepo } +func HyphaeDir() string { return filepath.ToSlash(paths.gitRepo) } // GitRepo returns the path to the Git repository of the wiki. func GitRepo() string { return paths.gitRepo } diff --git a/hyphae/files.go b/hyphae/files.go index 43b8c67..a0ee9cc 100644 --- a/hyphae/files.go +++ b/hyphae/files.go @@ -73,7 +73,7 @@ func indexHelper(path string, nestLevel uint, ch chan ExistingHypha) { } var ( - hyphaPartPath = filepath.Join(path, node.Name()) + hyphaPartPath = filepath.ToSlash(filepath.Join(path, node.Name())) hyphaName, isText, skip = mimetype.DataFromFilename(hyphaPartPath) ) if !skip {