Skip to content

Commit f56a3b0

Browse files
committed
frontend/Devices: Add button to Tokens page when no device is registerd
1 parent 69e26b6 commit f56a3b0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

frontend/src/pages/Devices.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { showAlert } from "../components/Alert";
55
import { Base64 } from "js-base64";
66
import { Component } from "preact";
77
import { fetchClient, get_decrypted_secret, pub_key, secret } from "../utils";
8-
import { Container } from "react-bootstrap";
8+
import { Button, Container } from "react-bootstrap";
99
import i18n from "../i18n";
1010
import { useLocation } from "preact-iso";
1111
import { Device, StateDevice, SortColumn, DeviceListState } from "../components/device/types";
@@ -355,6 +355,13 @@ export class DeviceList extends Component<{}, DeviceListState> {
355355
<div className="text-muted">
356356
<h5>{t("no_devices")}</h5>
357357
</div>
358+
<Button
359+
variant="primary"
360+
className="mt-3"
361+
onClick={() => route("/tokens")}
362+
>
363+
{i18n.t("tokens.create_token")}
364+
</Button>
358365
</Container>
359366
);
360367
}

0 commit comments

Comments
 (0)