From 17416b81dd4f454f8e1e55de875f17402addbf37 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 29 Jun 2022 09:27:49 -0500 Subject: add privilege button and icon --- src/web/src/components/App.js | 8 ++++++-- src/web/src/components/System/Info/index.js | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'src/web') diff --git a/src/web/src/components/App.js b/src/web/src/components/App.js index 206cea34..ea24924a 100644 --- a/src/web/src/components/App.js +++ b/src/web/src/components/App.js @@ -116,7 +116,7 @@ class App extends Component { render = () => { const { login, applicationState = {}, applicationOptions = {}, error, initialized, retriesExhausted } = this.state; - const { version = {}, server, pendingReconnect, pendingRestart, shares = {} } = applicationState; + const { version = {}, server, pendingReconnect, pendingRestart, shares = {}, user } = applicationState; const { isUpdateAvailable, current, latest } = version; const { scanPending: pendingShareRescan } = shares; @@ -203,7 +203,11 @@ class App extends Component { {server?.isConnected && disconnect()} > - Connected + + + {user?.privileges?.isPrivileged && + } + Connected } {(!server?.isConnected) && connect()} diff --git a/src/web/src/components/System/Info/index.js b/src/web/src/components/System/Info/index.js index a3342ea0..a703d4bc 100644 --- a/src/web/src/components/System/Info/index.js +++ b/src/web/src/components/System/Info/index.js @@ -29,19 +29,29 @@ const Info = ({ state }) => {
getVersion({ forceCheck: true })} > Check for Updates + + window.open(`http://www.slsknet.org/qtlogin.php?username=${state?.user?.username}`, '_blank')} + > + Get Privileges +
@@ -58,7 +68,7 @@ const Info = ({ state }) => { trigger={