mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 20:36:21 -05:00
Creating Event and Flag systems. Events are used to send and display a toast to the App. Flags are used to signal if some action has been performed, or if a package is installed.
This commit is contained in:
parent
5cbea1ba15
commit
93f0e7494f
45 changed files with 923 additions and 355 deletions
|
|
@ -4,7 +4,7 @@ import {Link} from "react-router-dom";
|
|||
import {
|
||||
DisableDownloadsToggle,
|
||||
isEmpty,
|
||||
secondsToElapsedPopup,
|
||||
isoDatetimeToElapsedPopup,
|
||||
secondsToFrequency,
|
||||
textEllipsis,
|
||||
useTitle,
|
||||
|
|
@ -162,10 +162,10 @@ class DownloadRow extends React.Component {
|
|||
</TableCell>
|
||||
<TableCell>{secondsToFrequency(frequency)}</TableCell>
|
||||
<TableCell>
|
||||
{last_successful_download ? secondsToElapsedPopup(last_successful_download) : null}
|
||||
{last_successful_download ? isoDatetimeToElapsedPopup(last_successful_download) : null}
|
||||
{status === 'pending' ? <Loader active inline size='tiny'/> : null}
|
||||
</TableCell>
|
||||
<TableCell>{secondsToElapsedPopup(next_download)}</TableCell>
|
||||
<TableCell>{next_download ? isoDatetimeToElapsedPopup(next_download) : null}</TableCell>
|
||||
<TableCell>
|
||||
{error && errorModal}
|
||||
{deleteButton}
|
||||
|
|
@ -223,7 +223,7 @@ class StoppableRow extends React.Component {
|
|||
(text) => <Link to={location}>{text}</Link> :
|
||||
(text) => <a href={url} target='_blank' rel='noopener noreferrer'>{text}</a>;
|
||||
|
||||
let completedAtCell = last_successful_download ? secondsToElapsedPopup(last_successful_download) : null;
|
||||
let completedAtCell = last_successful_download ? isoDatetimeToElapsedPopup(last_successful_download) : null;
|
||||
let buttonCell = <TableCell/>;
|
||||
if (status === 'pending' || status === 'new') {
|
||||
buttonCell = (
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ export class Settings extends React.Component {
|
|||
hotspot_status: null,
|
||||
throttle_on_startup: null,
|
||||
throttle_status: null,
|
||||
timezone: {timezone: null},
|
||||
}
|
||||
|
||||
this.handleSubmit = this.handleSubmit.bind(this);
|
||||
|
|
@ -50,7 +49,6 @@ export class Settings extends React.Component {
|
|||
hotspot_status: settings.hotspot_status,
|
||||
throttle_on_startup: settings.throttle_on_startup,
|
||||
throttle_status: settings.throttle_status,
|
||||
timezone: {value: settings.timezone, label: settings.timezone},
|
||||
}, this.handleHotspotChange);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
@ -68,7 +66,6 @@ export class Settings extends React.Component {
|
|||
hotspot_password: this.state.hotspot_password,
|
||||
hotspot_ssid: this.state.hotspot_ssid,
|
||||
throttle_on_startup: this.state.throttle_on_startup,
|
||||
timezone: this.state.timezone.value,
|
||||
}
|
||||
await saveSettings(settings);
|
||||
this.setState({disabled: false, pending: false});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue