From 403fb2eb98deb2e352f700b2503fdf5b27679c96 Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Mon, 11 Feb 2019 22:31:55 +0000
Subject: [PATCH] Adding and removing repos.
---
borgbutler-webapp/src/components/views/repos/RepoArchiveListView.jsx | 50 ++++++++++++++++++++++++++------------------------
1 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/borgbutler-webapp/src/components/views/repos/RepoArchiveListView.jsx b/borgbutler-webapp/src/components/views/repos/RepoArchiveListView.jsx
index 05789f6..566a083 100644
--- a/borgbutler-webapp/src/components/views/repos/RepoArchiveListView.jsx
+++ b/borgbutler-webapp/src/components/views/repos/RepoArchiveListView.jsx
@@ -160,30 +160,32 @@
</tr>
}
- content1 = <Table hover>
- <tbody>
- <tr>
- <th>Archive</th>
- <th>Time</th>
- <th></th>
- <th>Id</th>
- </tr>
- {repo.archives.map((archive) => {
- // Return the element. Also pass key
- let loaded = '';
- if (archive.fileListAlreadyCached) {
- loaded = <IconCheck/>;
- }
- return (
- <tr key={archive.id}>
- <td><Link to={`/archives/${repo.id}/${archive.id}/`}>{archive.name}</Link></td>
- <td>{archive.time}</td>
- <td>{loaded}</td>
- <td>{archive.id}</td>
- </tr>);
- })}
- </tbody>
- </Table>;
+ if (repo.archives) {
+ content1 = <Table hover>
+ <tbody>
+ <tr>
+ <th>Archive</th>
+ <th>Time</th>
+ <th></th>
+ <th>Id</th>
+ </tr>
+ {repo.archives.map((archive) => {
+ // Return the element. Also pass key
+ let loaded = '';
+ if (archive.fileListAlreadyCached) {
+ loaded = <IconCheck/>;
+ }
+ return (
+ <tr key={archive.id}>
+ <td><Link to={`/archives/${repo.id}/${archive.id}/`}>{archive.name}</Link></td>
+ <td>{archive.time}</td>
+ <td>{loaded}</td>
+ <td>{archive.id}</td>
+ </tr>);
+ })}
+ </tbody>
+ </Table>;
+ }
content2 = <Table striped bordered hover>
<tbody>
<tr>
--
Gitblit v1.10.0