From 686b19c7c42886568ef8ab676da631af7d7c2c7b Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Fri, 4 Mar 2022 13:44:27 +0100 Subject: [PATCH] Added root-only mode for share button --- src/grafana.js | 2 +- src/livepeer.js | 2 +- src/orchestratorViewer.js | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/grafana.js b/src/grafana.js index 4321edf..2049898 100644 --- a/src/grafana.js +++ b/src/grafana.js @@ -59,7 +59,7 @@ const Grafana = (obj) => {
- +
diff --git a/src/livepeer.js b/src/livepeer.js index a33b24e..380be4c 100644 --- a/src/livepeer.js +++ b/src/livepeer.js @@ -153,7 +153,7 @@ const Livepeer = (obj) => {
- +
diff --git a/src/orchestratorViewer.js b/src/orchestratorViewer.js index 85fc13a..c6630b9 100644 --- a/src/orchestratorViewer.js +++ b/src/orchestratorViewer.js @@ -59,6 +59,13 @@ const Orchestrator = (obj) => { thisUrl = "https://explorer.livepeer.org/accounts/" + thisID; } + let shareUrl; + if (obj.rootOnly){ + shareUrl = window.location.href; + }else{ + shareUrl = window.location.href + "?orchAddr=" + thisID; + } + return (
@@ -74,7 +81,7 @@ const Orchestrator = (obj) => {