From 0d145a7255676f7a81d344dcaaf81e0e12df3b32 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 29 Jun 2022 08:27:02 -0500 Subject: stop sorting info and options --- src/web/src/components/System/Info/index.js | 2 +- src/web/src/components/System/Options/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/web') diff --git a/src/web/src/components/System/Info/index.js b/src/web/src/components/System/Info/index.js index 7068e047..a3342ea0 100644 --- a/src/web/src/components/System/Info/index.js +++ b/src/web/src/components/System/Info/index.js @@ -17,7 +17,7 @@ const Info = ({ state }) => { useEffect(() => { setTimeout(() => { - setContents(YAML.stringify(state, { simpleKeys: true, sortMapEntries: true })); + setContents(YAML.stringify(state, { simpleKeys: true, sortMapEntries: false })); }, 250); }, [state]); diff --git a/src/web/src/components/System/Options/index.js b/src/web/src/components/System/Options/index.js index 16928a29..d0872960 100644 --- a/src/web/src/components/System/Options/index.js +++ b/src/web/src/components/System/Options/index.js @@ -19,7 +19,7 @@ const Index = ({ options }) => { useEffect(() => { setTimeout(() => { - setContents(YAML.stringify(options, { simpleKeys: true, sortMapEntries: true })); + setContents(YAML.stringify(options, { simpleKeys: true, sortMapEntries: false })); }, 250); }, [options]); -- cgit v1.2.3 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={