From 964e5325f92d3cbe85d6d52dce9e516bbb2a918a Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 2 Dec 2022 11:23:05 -0700 Subject: [PATCH] Adding Segment around Status elements. --- app/src/components/Channels.js | 324 ++++++++++++++------------- app/src/components/admin/Admin.js | 32 +-- app/src/components/admin/Settings.js | 195 ++++++++-------- app/src/components/admin/Status.js | 96 ++++---- 4 files changed, 333 insertions(+), 314 deletions(-) diff --git a/app/src/components/Channels.js b/app/src/components/Channels.js index 9ec0ac4c..4c80ea05 100644 --- a/app/src/components/Channels.js +++ b/app/src/components/Channels.js @@ -256,173 +256,175 @@ function ChannelPage({create, header}) { } -
{header}
- -
- - - changeValue('name', value)} - /> - - - - changeValue('directory', value)} - placeholder='videos/channel directory' - /> - - - { - create !== undefined && + +
{header}
+ + - {/* Empty field*/} - - { - handleCheckbox(null, {name: 'mkdir', checked: i}) - }} - /> - + changeValue('name', value)} + /> + + + + changeValue('directory', value)} + placeholder='videos/channel directory' + /> - } - - - - - - - - - - - - - - - - - Advanced Settings - - - -
- The following settings are encouraged by default, modify them at your own risk. -
- - - -
-
-
- - - - - - - - {!create && - <> - - setDeleteOpen(false)} - onConfirm={handleDeleteConfirm} + { + create !== undefined && + + {/* Empty field*/} + + + { + handleCheckbox(null, {name: 'mkdir', checked: i}) + }} /> - - - - } - - - - - - + + + + } + + + + + - + + + + + + + + + + + Advanced Settings + + + +
+ The following settings are encouraged by default, modify them at your own risk. +
+ + + +
+
+
+ + + + + + + + {!create && + <> + + setDeleteOpen(false)} + onConfirm={handleDeleteConfirm} + /> + + + + } + + + + + + + + +
{channel.statistics && } diff --git a/app/src/components/admin/Admin.js b/app/src/components/admin/Admin.js index adac4ff0..e1b44bf3 100644 --- a/app/src/components/admin/Admin.js +++ b/app/src/components/admin/Admin.js @@ -1,10 +1,10 @@ import React from 'react'; import {Container} from "semantic-ui-react"; import {getStatus, saveSettings} from "../../api"; -import {PageContainer, TabLinks, Toggle, useTitle} from "../Common"; +import {PageContainer, TabLinks, Toggle} from "../Common"; import {Route, Routes} from "react-router-dom"; import {ThemeContext} from "../../contexts/contexts"; -import {Header, Loader} from "../Theme"; +import {Header, Loader, Segment} from "../Theme"; import {Downloads} from "./Downloads"; import {Settings} from "./Settings"; import {Status} from "./Status"; @@ -44,19 +44,21 @@ class WROLMode extends React.Component { return {({t}) => -
WROL Mode
-
- Enable read-only mode. No content can be deleted or modified. Enable this when the SHTF and you - want to prevent any potential loss of data. -
-

- Note: User settings and favorites can still be modified. -

- + +
WROL Mode
+
+ Enable read-only mode. No content can be deleted or modified. Enable this when the SHTF and you + want to prevent any potential loss of data. +
+

+ Note: User settings and favorites can still be modified. +

+ +
}
diff --git a/app/src/components/admin/Settings.js b/app/src/components/admin/Settings.js index 25cf2e85..e36fe8ae 100644 --- a/app/src/components/admin/Settings.js +++ b/app/src/components/admin/Settings.js @@ -1,7 +1,7 @@ import React from "react"; import {getSettings, saveSettings} from "../../api"; -import {Button, Form, FormField, FormGroup, FormInput, Header, Loader} from "../Theme"; -import {Container, Dimmer, Divider, Icon, Modal} from "semantic-ui-react"; +import {Button, Form, FormField, FormGroup, FormInput, Header, Loader, Segment} from "../Theme"; +import {Container, Dimmer, Icon, Modal} from "semantic-ui-react"; import {ThemeContext} from "../../contexts/contexts"; import {HelpPopup, HotspotToggle, ThrottleToggle, Toggle, WROLModeMessage} from "../Common"; import QRCode from "react-qr-code"; @@ -127,112 +127,115 @@ export class Settings extends React.Component { {({i, t}) => - - - + + + + -
- The settings for your WROLPi. -
-

- Any changes will be written to config/wrolpi.yaml. -

+ +
+ Settings +
+

+ Any changes will be written to config/wrolpi.yaml. +

-
-
- this.handleInputChange(null, 'download_on_startup', checked)} - /> -
+ +
+ this.handleInputChange(null, 'download_on_startup', checked)} + /> +
-
- this.handleInputChange(null, 'hotspot_on_startup', checked)} - /> -
+
+ this.handleInputChange(null, 'hotspot_on_startup', checked)} + /> +
-
- this.handleInputChange(null, 'throttle_on_startup', checked)} - /> -
+
+ this.handleInputChange(null, 'throttle_on_startup', checked)} + /> +
- - - Download Timeout - - } - value={download_timeout} - disabled={disabled || download_timeout === null} - onChange={(e, d) => this.handleTimeoutChange(e, 'download_timeout', d.value)} - /> - + } + value={download_timeout} + disabled={disabled || download_timeout === null} + onChange={(e, d) => this.handleTimeoutChange(e, 'download_timeout', d.value)} + /> + - - - this.setState({hotspot_ssid: d.value}, this.handleHotspotChange)} - /> - - this.setState({hotspot_password: d.value}, this.handleHotspotChange)} - /> - this.handleInputChange(e, 'hotspot_device', d.value)} - /> - + + + this.setState({hotspot_ssid: d.value}, this.handleHotspotChange)} + /> + + this.setState({hotspot_password: d.value}, this.handleHotspotChange)} + /> + this.handleInputChange(e, 'hotspot_device', d.value)} + /> + - this.setState({qrOpen: false})} - onOpen={this.handleQrOpen} - open={this.state.qrOpen} - trigger={qrButton} - > - - Scan this code to join the hotspot - - - - - + this.setState({qrOpen: false})} + onOpen={this.handleQrOpen} + open={this.state.qrOpen} + trigger={qrButton} + > + + Scan this code to join the hotspot + + + + + - - - this.handleInputChange(null, 'timezone', i)} - /> - + + + this.handleInputChange(null, 'timezone', i)} + /> + - + - - - + + + -
+ +
} diff --git a/app/src/components/admin/Status.js b/app/src/components/admin/Status.js index 23ba71d7..1ba25a34 100644 --- a/app/src/components/admin/Status.js +++ b/app/src/components/admin/Status.js @@ -1,7 +1,7 @@ import {Header, Progress, Segment, Statistic, StatisticGroup} from "../Theme"; import React, {useContext} from "react"; import {humanBandwidth, humanFileSize, LoadStatistic, useTitle} from "../Common"; -import {Divider, Responsive} from "semantic-ui-react"; +import {Responsive} from "semantic-ui-react"; import {ProgressPlaceholder} from "../Placeholder"; import Grid from "semantic-ui-react/dist/commonjs/collections/Grid"; import {StatusContext} from "../../contexts/contexts"; @@ -182,56 +182,68 @@ export function Status() { } return <> - - - - - - - - + + + + + + + + + -
Network Bandwidth
- {bandwidth ? - bandwidth.map(i => ) : - } + +
Network Bandwidth
+ {bandwidth ? bandwidth.map(i => ) : + } +
- + +
Drive Usage
+ {drives.map((drive) => )} +
-
Drive Usage
- {drives.map((drive) => )} - -
Drive Bandwidth
- {disk_bandwidth.map((disk) => )} + +
Drive Bandwidth
+ {disk_bandwidth.map((disk) => )} +
- - - - - - + + + + + + + + + -
Network Bandwidth
- {bandwidth ? - bandwidth.map(i => ) : - } + +
Network Bandwidth
+ {bandwidth ? bandwidth.map(i => ) : + } +
-
Drive Usage
- {drives.map((drive) => )} + +
Drive Usage
+ {drives.map((drive) => )} +
-
Drive Bandwidth
- {disk_bandwidth.map((disk) => )} + +
Drive Bandwidth
+ {disk_bandwidth.map((disk) => )} +
}