mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 15:06:19 -05:00
Updating archive's single-file call to use asyncio as well as fixing JSON error that used to be thrown. Trying two place for single-file executable. Adding more docs to bandwidth functions. Extracting reused functions out. Testing worker. Ordering bandwidth statuses by their name. Breaking down bandwidth by interface. Splitting download buttons to avoid overflow. Creating bandwidth worker which tracks server bandwidth usage to display on the status page. Testing get_bandwidth_info() with no psutil. Using psutil to fetch status. Adding bandwidth status.
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import {Card, PlaceholderImage, PlaceholderLine} from "semantic-ui-react";
|
|
import React, {useContext} from "react";
|
|
import {ThemeContext} from "../contexts/contexts";
|
|
import {Placeholder} from "./Theme";
|
|
|
|
export function CardPlacholder() {
|
|
const {s} = useContext(ThemeContext);
|
|
|
|
return <Card>
|
|
<Placeholder>
|
|
<PlaceholderImage rectangular/>
|
|
</Placeholder>
|
|
<Card.Content {...s}>
|
|
<Placeholder>
|
|
<PlaceholderLine/>
|
|
<PlaceholderLine/>
|
|
<PlaceholderLine/>
|
|
</Placeholder>
|
|
</Card.Content>
|
|
</Card>
|
|
}
|
|
|
|
export function VideoPlaceholder() {
|
|
return (
|
|
<Card.Group doubling stackable>
|
|
<CardPlacholder/>
|
|
</Card.Group>
|
|
)
|
|
}
|
|
|
|
export function ChannelPlaceholder() {
|
|
return (
|
|
<Placeholder>
|
|
<PlaceholderLine length='long'/>
|
|
<PlaceholderLine length='short'/>
|
|
</Placeholder>
|
|
)
|
|
}
|
|
|
|
export function ProgressPlaceholder() {
|
|
return <Placeholder style={{marginBottom: '1em'}}>
|
|
<PlaceholderLine/>
|
|
<PlaceholderLine/>
|
|
</Placeholder>
|
|
}
|