Hide backup wget command behind a button
This commit is contained in:
parent
241199a3d0
commit
3e03159164
|
@ -9,6 +9,7 @@ import { NotFound } from './Misc.js';
|
||||||
export function Admin(props) {
|
export function Admin(props) {
|
||||||
const { token, user } = props;
|
const { token, user } = props;
|
||||||
const [backup, setBackup] = useState(false);
|
const [backup, setBackup] = useState(false);
|
||||||
|
const [reveal, setReveal] = useState(false);
|
||||||
const [error, setError] = useState(false);
|
const [error, setError] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -39,12 +40,16 @@ export function Admin(props) {
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Automate with wget (keep secret, that's <b>your</b> login token):
|
Automate with wget (keep secret, that's <b>your</b> login token):
|
||||||
|
{reveal ?
|
||||||
<pre>
|
<pre>
|
||||||
wget \
|
wget \
|
||||||
<br /> --content-disposition \
|
<br /> --content-disposition \
|
||||||
<br /> --header="Authorization: Token {token}" \
|
<br /> --header="Authorization: Token {token}" \
|
||||||
<br /> {apiUrl}/backup/
|
<br /> {apiUrl}/backup/
|
||||||
</pre>
|
</pre>
|
||||||
|
:
|
||||||
|
<div><Button onClick={() => setReveal(true)}>Show Secret</Button></div>
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user