Skip to content

Commit

Permalink
(simatec) Responsive Design added
Browse files Browse the repository at this point in the history
  • Loading branch information
simatec committed Aug 21, 2024
1 parent c69c6fd commit 02fc5da
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 37 deletions.
6 changes: 3 additions & 3 deletions admin/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.bd1167d4.css",
"main.js": "./static/js/main.0cad369d.js",
"main.js": "./static/js/main.50e56a92.js",
"static/media/history.png": "./static/media/history.d21dcfa508bd8a624c85.png",
"static/media/Ground Floor.svg": "./static/media/Ground Floor.2b7c5c91db7f070935a2.svg",
"static/media/Second Floor.svg": "./static/media/Second Floor.a2d5ed32df336591c06b.svg",
Expand Down Expand Up @@ -123,10 +123,10 @@
"static/media/Outdoor Blinds.svg": "./static/media/Outdoor Blinds.37b85a9c060a4af48da9.svg",
"static/media/Upstairs.svg": "./static/media/Upstairs.441813e54e0daca0882d.svg",
"main.bd1167d4.css.map": "./static/css/main.bd1167d4.css.map",
"main.0cad369d.js.map": "./static/js/main.0cad369d.js.map"
"main.50e56a92.js.map": "./static/js/main.50e56a92.js.map"
},
"entrypoints": [
"static/css/main.bd1167d4.css",
"static/js/main.0cad369d.js"
"static/js/main.50e56a92.js"
]
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin/tab_m.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>backitup Settings</title><script defer="defer" src="./static/js/main.0cad369d.js"></script><link href="./static/css/main.bd1167d4.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>backitup Settings</title><script defer="defer" src="./static/js/main.50e56a92.js"></script><link href="./static/css/main.bd1167d4.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
53 changes: 26 additions & 27 deletions src/src/Components/BackupNow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,21 @@ class BackupNow extends ConfigGeneric {
const isFullScreen = window.matchMedia('(max-width: 600px)').matches;
this.setState({ isFullScreen });
};

renderLine(line, i) {
return <div key={i} style={{ ...this.state.isFullScreen ? this.state.styles.responseTextLine : this.state.styles.textLine }}>
<div style={{ ...this.state.styles.textTime, ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>{line.ts} </div>
<div style={{ ...this.state.styles.textLevel, ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>{line.level} </div>
<div style={{ ...this.state.styles.textSource, ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>{line.source} </div>
<div style={{ ...(this.state.isFullScreen ? this.state.styles.responseText : this.state.styles.text), ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>{line.text}</div>
<div style={{ ...this.state.styles.textTime, ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>
{line.ts}
</div>
<div style={{ ...this.state.styles.textLevel, ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>
{line.level}
</div>
<div style={{ ...this.state.styles.textSource, ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>
{line.source}
</div>
<div style={{ ...(this.state.isFullScreen ? this.state.styles.responseText : this.state.styles.text), ...(line.level ? this.state.styles[`textLevel-${line.level}`] : undefined) }}>
{line.text}
</div>
</div>;
}

Expand Down Expand Up @@ -249,29 +258,19 @@ class BackupNow extends ConfigGeneric {
<>
<Button
disabled={!this.props.alive || this.state.executing}
onClick={() =>
this.setState(
{
executionDialog: true,
executionLog: [
{
ts: BackupNow.getTime(),
level: 'INFO',
text: I18n.t('starting Backup...'),
source: 'gui',
},
],
executing: true,
},
async () => {
this.lastExecutionLine = '';
await this.props.socket.setState(
`${this.props.adapterName}.${this.props.instance}.oneClick.${this.props.schema.backUpType}`,
true
);
}
)
}
onClick={() => this.setState({
executionDialog: true,
executionLog: [{
ts: BackupNow.getTime(),
level: 'INFO',
text: I18n.t('starting Backup...'),
source: 'gui',
}],
executing: true,
}, async () => {
this.lastExecutionLine = '';
await this.props.socket.setState(`${this.props.adapterName}.${this.props.instance}.oneClick.${this.props.schema.backUpType}`, true);
})}
className={this.props.className}
color={this.props.color}
variant="contained"
Expand Down
4 changes: 2 additions & 2 deletions src/src/Components/GetBackups.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ const GetBackups = props => {
:
<span style={{ marginLeft: 8 }}>{parseSize(backup.size)}</span>
</TableCell>
<TableCell style={{ width: fullScreen ? '100%' : 88, borderBottom: fullScreen ? '1px outset rgb(224, 224, 224)' : '1px solid rgb(224, 224, 224)', padding: '6px 0', }}>
<div style={{ display: 'flex', gap: 8, justifyContent: fullScreen ? 'center' : 'normal'}}>
<TableCell style={{ width: fullScreen ? '100%' : 88, borderBottom: fullScreen ? '1px outset rgb(224, 224, 224)' : '1px solid rgb(224, 224, 224)', padding: '6px 0' }}>
<div style={{ display: 'flex', gap: 8, justifyContent: fullScreen ? 'center' : 'normal' }}>
{props.allowDownload ? <Tooltip title={I18n.t('Download Backup File')}>
<Fab
size="small"
Expand Down

0 comments on commit 02fc5da

Please sign in to comment.