mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
browse backups dialog: add styling for empty session list
This commit is contained in:
parent
da2e9f99e4
commit
6b7f04b63e
|
@ -56,6 +56,21 @@
|
||||||
height: 90px;
|
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 {
|
.browse-backups .session-item {
|
||||||
transition: all 500ms;
|
transition: all 500ms;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
pskl.app.backupService.list().then(function (sessions) {
|
pskl.app.backupService.list().then(function (sessions) {
|
||||||
var html = '';
|
var html = '';
|
||||||
if (sessions.length === 0) {
|
if (sessions.length === 0) {
|
||||||
html = 'No session found ...';
|
html = pskl.utils.Template.get('session-list-empty');
|
||||||
} else {
|
} else {
|
||||||
var sessionItemTemplate = pskl.utils.Template.get('session-list-item');
|
var sessionItemTemplate = pskl.utils.Template.get('session-list-item');
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
|
@ -26,7 +26,10 @@
|
||||||
pskl.app.backupService.getSnapshotsBySessionId(sessionId).then(function (snapshots) {
|
pskl.app.backupService.getSnapshotsBySessionId(sessionId).then(function (snapshots) {
|
||||||
var html = '';
|
var html = '';
|
||||||
if (snapshots.length === 0) {
|
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 {
|
} else {
|
||||||
var sessionItemTemplate = pskl.utils.Template.get('snapshot-list-item');
|
var sessionItemTemplate = pskl.utils.Template.get('snapshot-list-item');
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</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">
|
<script type="text/template" id="session-list-item">
|
||||||
<div class="session-item">
|
<div class="session-item">
|
||||||
<div class="session-details">
|
<div class="session-details">
|
||||||
|
@ -52,6 +56,10 @@
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</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">
|
<script type="text/template" id="snapshot-list-item">
|
||||||
<div class="snapshot-item">
|
<div class="snapshot-item">
|
||||||
<div class="snapshot-details">
|
<div class="snapshot-details">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user