Skip to content

Commit 8a376bb

Browse files
committed
Show random note button only when graph data is availible
Fixes #168
1 parent 990a35e commit 8a376bb

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- implemented issue (additional highlight.js support) [#173](https://github.com/secure-77/Perlite/issues/173)
66
- sustainable mb_strlen / strlen / utf8_decode fix
77
- removed border from local graph and custom page section
8+
- added headline copy link button [#156](https://github.com/secure-77/Perlite/issues/156)
9+
- show random button only when graph-data is availible [#168](https://github.com/secure-77/Perlite/issues/168)
810

911

1012
## 1.6

perlite/.js/perlite.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ function renderGraph(modal, path = "", filter_emptyNodes = false, show_tags = tr
565565
// no graph found exit
566566
if ($("#allGraphNodes").length == 0 || $("#allGraphNodes").text == '[]') {
567567
console.log("Graph: no data found")
568+
document.getElementById("random_note").style.display = "none";
568569
return;
569570
}
570571

perlite/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class="logo-full">
125125
<path d="M12 12v3"></path>
126126
</svg></div>
127127
</div>
128-
<div class="side-dock-actions">
128+
<div id="random_note" class="side-dock-actions">
129129
<div class="clickable-icon side-dock-ribbon-action" aria-label="Open random note"
130130
data-tooltip-position="right" data-tooltip-delay="300">
131131
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"

0 commit comments

Comments
 (0)