From 0b7ace83d5e79c4916acb722a693fea6295cfaa2 Mon Sep 17 00:00:00 2001 From: ssendev Date: Mon, 1 Jun 2020 19:28:13 +0200 Subject: [PATCH] ui: hide create/open pad buttons on index page (#3974) if requireSession or editOnly is set these buttons always fail --- src/locales/en.json | 1 + src/templates/index.html | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index fab3c6d2b..752521273 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,6 +1,7 @@ { "index.newPad": "New Pad", "index.createOpenPad": "or create/open a Pad with the name:", + "index.openPad": "open an existing Pad with the name:", "pad.toolbar.bold.title": "Bold (Ctrl+B)", "pad.toolbar.italic.title": "Italic (Ctrl+I)", diff --git a/src/templates/index.html b/src/templates/index.html index 4fb810478..69cebc7a7 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -161,12 +161,18 @@
<% e.begin_block("indexWrapper"); %>
- - -
- - -
+ <% if (!settings.requireSession) { %> + <% if (settings.editOnly) { %> + + <% } else {%> + + + <% } %> +
+ + +
+ <% } %>
<% e.end_block(); %>