Add link to re-show the popup, and add some colour and other visual improvements
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
{{ template "menu.tmpl" . }}
|
||||
|
||||
|
||||
<div x-data="index()" x-init="fetch_data(); fetch_version()">
|
||||
|
||||
<p x-cloak x-show="version && version.upgrade_available">
|
||||
@@ -25,7 +24,7 @@
|
||||
<table class="pure-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th><th>filename</th><th>url</th><th>state</th><th>percent</th><th>eta</th><th>finished</th>
|
||||
<th>id</th><th>filename</th><th>url</th><th>show</th><th>state</th><th>percent</th><th>eta</th><th>finished</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -33,11 +32,12 @@
|
||||
<tr>
|
||||
<td x-text="item.id"></td>
|
||||
<td x-text="item.files"></td>
|
||||
<td><a x-bind:href="item.url">link</a></td>
|
||||
<td x-text="item.state"></td>
|
||||
<td><a class="int-link" x-bind:href="item.url">↗</a></td>
|
||||
<td><a class="int-link" @click="show_popup(item)" href="#">📄</a></td>
|
||||
<td :class="'state-'+item.state" x-text="item.state"></td>
|
||||
<td x-text="item.percent"></td>
|
||||
<td x-text="item.eta"></td>
|
||||
<td x-text="item.finished"></td>
|
||||
<td x-text="item.finished ? '✔' : '-'"></td>
|
||||
</tr>
|
||||
|
||||
</template>
|
||||
@@ -78,6 +78,9 @@
|
||||
setTimeout(() => { this.fetch_data() }, 1000);
|
||||
})
|
||||
},
|
||||
show_popup(item) {
|
||||
window.open(item.popup_url, item.id, "width={{ .Config.UI.PopupWidth }},height={{ .Config.UI.PopupHeight }}");
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -14,36 +14,48 @@
|
||||
overflow:auto;
|
||||
}
|
||||
footer {
|
||||
padding-top: 50px;
|
||||
font-size: 30%;
|
||||
padding-top: 50px;
|
||||
font-size: 30%;
|
||||
}
|
||||
.int-link {
|
||||
text-decoration: none;
|
||||
hover { color: red; }
|
||||
}
|
||||
.state-failed {
|
||||
color: red;
|
||||
}
|
||||
.state-downloading {
|
||||
color: blue;
|
||||
}
|
||||
.state-complete {
|
||||
color: green;
|
||||
}
|
||||
.gropple-config {
|
||||
font-size: 80%;
|
||||
font-size: 80%;
|
||||
}
|
||||
.gropple-config input.input-long {
|
||||
width: 27em;
|
||||
width: 27em;
|
||||
}
|
||||
.gropple-config button {
|
||||
border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.gropple-config button.button-del {
|
||||
background: rgb(202, 60, 60);
|
||||
background: rgb(202, 60, 60);
|
||||
}
|
||||
.gropple-config button.button-add {
|
||||
background: rgb(60, 200, 60);
|
||||
background: rgb(60, 200, 60);
|
||||
}
|
||||
.gropple-config .pure-form-message {
|
||||
padding-top: .5em;
|
||||
padding-bottom: 1.5em;
|
||||
padding-top: .5em;
|
||||
padding-bottom: 1.5em;
|
||||
}
|
||||
.error {
|
||||
color: red;
|
||||
color: red;
|
||||
}
|
||||
.success {
|
||||
color: green;
|
||||
color: green;
|
||||
}
|
||||
|
||||
|
||||
[x-cloak] { display: none !important; }
|
||||
|
||||
</style>
|
||||
@@ -57,4 +69,4 @@
|
||||
</body>
|
||||
{{ template "js" . }}
|
||||
</html>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user