browse backups dialog: add styling for empty session list
This commit is contained in:
parent
da2e9f99e4
commit
6b7f04b63e
4 changed files with 28 additions and 2 deletions
|
@ -56,6 +56,21 @@
|
|||
height: 90px;
|
||||
}
|
||||
|
||||
.browse-backups .session-list-empty,
|
||||
.browse-backups .snapshot-list-empty {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-top: 100px;
|
||||
margin-left: -130px;
|
||||
padding: 30px;
|
||||
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
border: 1px solid;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.browse-backups .session-item {
|
||||
transition: all 500ms;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
pskl.app.backupService.list().then(function (sessions) {
|
||||
var html = '';
|
||||
if (sessions.length === 0) {
|
||||
html = 'No session found ...';
|
||||
html = pskl.utils.Template.get('session-list-empty');
|
||||
} else {
|
||||
var sessionItemTemplate = pskl.utils.Template.get('session-list-item');
|
||||
var html = '';
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
pskl.app.backupService.getSnapshotsBySessionId(sessionId).then(function (snapshots) {
|
||||
var html = '';
|
||||
if (snapshots.length === 0) {
|
||||
html = 'No snapshot found...';
|
||||
// This should normally never happen, all sessions have at least one snapshot and snapshots
|
||||
// can not be individually deleted.
|
||||
console.warn('Could not retrieve snapshots for a session');
|
||||
html = pskl.utils.Template.get('snapshot-list-empty');
|
||||
} else {
|
||||
var sessionItemTemplate = pskl.utils.Template.get('snapshot-list-item');
|
||||
var html = '';
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="session-list-empty">
|
||||
<div class="session-list-empty">No session found ...</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="session-list-item">
|
||||
<div class="session-item">
|
||||
<div class="session-details">
|
||||
|
@ -52,6 +56,10 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="snapshot-list-empty">
|
||||
<div class="snapshot-list-empty">No snapshot found ...</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="snapshot-list-item">
|
||||
<div class="snapshot-item">
|
||||
<div class="snapshot-details">
|
||||
|
|
Loading…
Reference in a new issue