From 1bbe6617d99e45492091b474111883cc5b1903b1 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:39:11 -0700 Subject: [PATCH 01/16] UX improvements Related to #612 --- web/_js/main/draw.js | 5 +++-- web/_js/main/infoblock.js | 4 ++-- web/about.html | 2 ++ web/index.html | 12 ++++++------ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/web/_js/main/draw.js b/web/_js/main/draw.js index 29f928bd5..c2b407fff 100644 --- a/web/_js/main/draw.js +++ b/web/_js/main/draw.js @@ -69,7 +69,7 @@ const periodClipboard = { const drawBackButton = document.createElement("a") drawBackButton.className = "btn btn-outline-primary" drawBackButton.id = "drawBackButton" -drawBackButton.textContent = "Exit Draw Mode" +drawBackButton.textContent = "Exit Drawing" const baseInputAddon = document.createElement("span") baseInputAddon.className = "input-group-text" @@ -106,7 +106,8 @@ function initDraw() { showListButton.insertAdjacentHTML("afterend", '') showListButton.parentElement.appendChild(drawBackButton) showListButton.remove() - + drawButton.remove() + // Opens draw menu wrapper.classList.remove('listHidden') bsOffcanvasDraw.show() diff --git a/web/_js/main/infoblock.js b/web/_js/main/infoblock.js index 5493ac09f..ad5c8dd6c 100644 --- a/web/_js/main/infoblock.js +++ b/web/_js/main/infoblock.js @@ -54,7 +54,7 @@ function createInfoBlock(entry, isPreview) { linkNameElement.textContent = entry.name headerElement.appendChild(linkElement) linkElement.appendChild(linkNameElement) - linkElement.insertAdjacentHTML("beforeend", '') + linkElement.insertAdjacentHTML("beforeend", '') element.appendChild(headerElement) const bodyElement = document.createElement("div") @@ -172,7 +172,7 @@ function createInfoBlock(entry, isPreview) { // Adds edit button only if element is not deleted if (!isPreview && (!entry.diff || entry.diff !== "delete")) { const editElement = document.createElement("a") - editElement.textContent = "Edit" + editElement.innerHTML = ' Edit' editElement.className = "btn btn-sm btn-outline-primary" editElement.href = "./?mode=draw&id=" + entry.id + formatHash(false) editElement.title = "Edit " + entry.name diff --git a/web/about.html b/web/about.html index b360de054..f52a52842 100644 --- a/web/about.html +++ b/web/about.html @@ -27,6 +27,8 @@ + + diff --git a/web/index.html b/web/index.html index bfe5bbcf8..07ba680a1 100644 --- a/web/index.html +++ b/web/index.html @@ -137,7 +137,8 @@
@@ -198,8 +199,7 @@