From ced507ca68a5041ffe25678ceeeee5c4819bf7e9 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Thu, 17 Feb 2022 10:56:21 -0700 Subject: [PATCH] render reflects new Leaf --- .gitignore | 4 ++- server/public/ui/.files.ctmpl.html | 21 +++++++++------ server/public/ui/.search.ctmpl.html | 9 ++++--- server/public/ui/render.go | 26 +++++++++---------- .../public/ui/templates/._editor.ctmpl.html | 15 +++++++---- .../public/ui/templates/._filetree.ctmpl.html | 9 ++++--- .../public/ui/templates/._import.ctmpl.html | 6 +++++ .../public/ui/templates/._results.ctmpl.html | 3 +++ .../ui/templates/._searchbar.ctmpl.html | 3 +++ server/public/ui/templates/_filetree.ctmpl | 4 +-- 10 files changed, 65 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 88eb4ab..a874295 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ server/testdata/workd/**/* server/testdata/media/**/* server/testdata/index.html ui/render -ui/**/.*.html +server/public/ui/**/.*.html +**/*.ctmpl.html +server/public/ui/render diff --git a/server/public/ui/.files.ctmpl.html b/server/public/ui/.files.ctmpl.html index 4884da6..fb61c5b 100644 --- a/server/public/ui/.files.ctmpl.html +++ b/server/public/ui/.files.ctmpl.html @@ -76,6 +76,9 @@ .tb_fullscreen { height: 100%; } + .button, button, input[type="button"] { + height: auto; + }
@@ -261,11 +264,11 @@ alert(`failed to push file ${id}: ${status}: ${body}`) throw `failed to push file ${id}: ${status}: ${body}` } - document.getElementById("saveFeedback").innerHTML = "success!" + document.getElementById("saveFeedback").style.display = "block" if (saveFeedbackInterval) { clearTimeout(saveFeedbackInterval) } - saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").innerHTML = ""}, 5000) + saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").style.display = "none"}, 2500) }, body, headers) } function deleteFile() { @@ -305,7 +308,10 @@
-
+
+
@@ -319,7 +325,7 @@ element: document.getElementById('my-text-area'), forceSync: true, indentWithTabs: false, - initialValue: "loading...", + initialValue: "# hello\n\n## world\n\n| this | is | my | table |\n| ---- | ---| ---| ----- |\n| hey |\n| ya | hey | ya |\n\n* and\n\t* a bulleted\n\t\t* list\n\n\u003e but here is a quote\n\n```go\n\/\/ and some go code\nfunc main() {\n\tlog.Println(\u0022hi\u0022)\n}\n```\n\nand\n\nnow\n\nthe\n\nnewlines\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t", showIcons: ["code", "table"], spellChecker: false, sideBySideFullscreen: false, @@ -339,7 +345,6 @@ }, status: ["lines", "words", "cursor"], }) - easyMDE.value("# hello\n\n## world\n\n| this | is | my | table |\n| ---- | ---| ---| ----- |\n| hey |\n| ya | hey | ya |\n\n* and\n\t* a bulleted\n\t\t* list\n\n\u003e but here is a quote\n\n```go\n// and some go code\nfunc main() {\n\tlog.Println(\"hi\")\n}\n```\n\nand\n\nnow\n\nthe\n\nnewlines\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t") diff --git a/server/public/ui/.search.ctmpl.html b/server/public/ui/.search.ctmpl.html index 8e066e7..1312b54 100644 --- a/server/public/ui/.search.ctmpl.html +++ b/server/public/ui/.search.ctmpl.html @@ -76,6 +76,9 @@ .tb_fullscreen { height: 100%; } + .button, button, input[type="button"] { + height: auto; + }
diff --git a/server/public/ui/render.go b/server/public/ui/render.go index cf1e542..d97926e 100644 --- a/server/public/ui/render.go +++ b/server/public/ui/render.go @@ -93,25 +93,25 @@ newlines {Title: "title id00 / title id10 / title id20", ID: "id00/id10/id20"}, }, "Tree": `{ - "Leaf": {"Title": ""}, + "Leaf": {"Meta":{"Title": ""}}, "Branches": { "id00": { - "Leaf": {"Title": "title id00"}, + "Leaf": {"Meta":{"Title": "title id00"}}, "Branches": { - "id10": {"Leaf":{"Title":"title id10"},"Branches":{ - "id20": {"Leaf":{"Title":"title id20"},"Branches":{}} + "id10": {"Leaf":{"Meta":{"Title":"title id10"}},"Branches":{ + "id20": {"Leaf":{"Meta":{"Title":"title id20"}},"Branches":{}} }}, - "id11": {"Leaf":{"Title":"title id11"},"Branches":{}} + "id11": {"Leaf":{"Meta":{"Title":"title id11"}},"Branches":{}} } }, - "id01": {"Leaf":{"Title":"title id01"},"Branches":{}}, - "id02": {"Leaf":{"Title":"title id02"},"Branches":{}}, - "id03": {"Leaf":{"Title":"title id03"},"Branches":{}}, - "id04": {"Leaf":{"Title":"title id04"},"Branches":{}}, - "id04": {"Leaf":{"Title":"title id04"},"Branches":{}}, - "id05": {"Leaf":{"Title":"title id05"},"Branches":{}}, - "id06": {"Leaf":{"Title":"title id06"},"Branches":{}}, - "id07": {"Leaf":{"Title":"title id07 but it's really really really long"},"Branches":{}} + "id01": {"Leaf":{"Meta":{"Title":"title id01"}},"Branches":{}}, + "id02": {"Leaf":{"Meta":{"Title":"title id02"}},"Branches":{}}, + "id03": {"Leaf":{"Meta":{"Title":"title id03"}},"Branches":{}}, + "id04": {"Leaf":{"Meta":{"Title":"title id04"}},"Branches":{}}, + "id04": {"Leaf":{"Meta":{"Title":"title id04"}},"Branches":{}}, + "id05": {"Leaf":{"Meta":{"Title":"title id05"}},"Branches":{}}, + "id06": {"Leaf":{"Meta":{"Title":"title id06"}},"Branches":{}}, + "id07": {"Leaf":{"Meta":{"Title":"title id07 but it's really really really long"}},"Branches":{}} } }`, } diff --git a/server/public/ui/templates/._editor.ctmpl.html b/server/public/ui/templates/._editor.ctmpl.html index 3428caa..6f1e176 100644 --- a/server/public/ui/templates/._editor.ctmpl.html +++ b/server/public/ui/templates/._editor.ctmpl.html @@ -73,6 +73,9 @@ .tb_fullscreen { height: 100%; } + .button, button, input[type="button"] { + height: auto; + } diff --git a/server/public/ui/templates/._filetree.ctmpl.html b/server/public/ui/templates/._filetree.ctmpl.html index f242a71..d0252b2 100644 --- a/server/public/ui/templates/._filetree.ctmpl.html +++ b/server/public/ui/templates/._filetree.ctmpl.html @@ -73,6 +73,9 @@ .tb_fullscreen { height: 100%; } + .button, button, input[type="button"] { + height: auto; + } diff --git a/server/public/ui/templates/._import.ctmpl.html b/server/public/ui/templates/._import.ctmpl.html index 86ce551..b1e5fc7 100644 --- a/server/public/ui/templates/._import.ctmpl.html +++ b/server/public/ui/templates/._import.ctmpl.html @@ -73,6 +73,9 @@ .tb_fullscreen { height: 100%; } + .button, button, input[type="button"] { + height: auto; + }