Improve Networks page
Better sorting, more clear fa icons
This commit is contained in:
1 parent
4c2e669fa2
commit
3b4103baf7
4 files changed
+35
-34
No files matched your search
@@ -11,9 +11,7 @@
|
||||
<script>
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded', function () {
|
||||
sort_networks("name");
|
||||
sort_networks("engine");
|
||||
sort_networks("default");
|
||||
sort_networks(['default', 'engine', 'name']);
|
||||
}, false
|
||||
);
|
||||
</script>
|
||||
@@ -25,21 +23,21 @@
|
||||
<table id="network-table" class="hoverable">
|
||||
|
||||
<tr class="table-header">
|
||||
<th class="cursor" onclick="sort_networks('default')"></th>
|
||||
<th class="cursor" onclick="sort_networks('engine')">Engine</th>
|
||||
<th class="cursor" onclick="sort_networks('author')">Author</th>
|
||||
<th class="cursor" onclick="sort_networks('name')">Name</th>
|
||||
<th class="cursor" onclick="sort_networks('sha256')")>Hash</th>
|
||||
<th class="cursor" onclick="sort_networks(['default'])"></th>
|
||||
<th class="cursor" onclick="sort_networks(['engine'])">Engine</th>
|
||||
<th class="cursor" onclick="sort_networks(['author'])">Author</th>
|
||||
<th class="cursor" onclick="sort_networks(['name'])">Name</th>
|
||||
<th class="cursor" onclick="sort_networks(['sha256'])")>Hash</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
{% for network in networks %}
|
||||
<tr>
|
||||
{% if network.default %}
|
||||
<td><i class="fas fa-star" aria-hidden="true"></i></td>
|
||||
<td><i class="fas fa-star default-network" aria-hidden="true"></i></td>
|
||||
{% else %}
|
||||
<td><a class="unstarred" href="/networks/{{network.engine}}/default/{{network.sha256}}">
|
||||
<i class="far fa-star" aria-hidden="true"></i></a></td>
|
||||
<td><a href="/networks/{{network.engine}}/default/{{network.sha256}}">
|
||||
<i class="far fa-star non-default-network" aria-hidden="true"></i></a></td>
|
||||
{% endif %}
|
||||
|
||||
<td><a href="/networks/{{network.engine}}/">{{network.engine}}</a></td>
|
||||
@@ -51,7 +49,7 @@
|
||||
<a class="redlink"
|
||||
onclick="return confirm('YOU ARE DELETING THIS NETWORK FILE FOREVER')"
|
||||
href="/networks/{{network.engine}}/delete/{{network.sha256}}">
|
||||
<i class="fas fa-minus-circle"></i></a>
|
||||
<i class="fa-solid fa-trash-can" style="color: #A00000;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
{% for engine, repo in profile.repos.items %}
|
||||
<div class="row" id="engine-row-{{ engine }}">
|
||||
<label>{{ engine }}</label>
|
||||
<input type="text" name="engine-repo-{{ engine }}" value="{{ repo|removePrefix:'https://github.com/' }}">
|
||||
<input type="text" name="engine-repo-{{engine}}" value="{{ repo|removePrefix:'https://github.com/' }}">
|
||||
|
||||
<span>
|
||||
<input id="radio-{{engine}}" type="radio" name="default-status" value="{{ engine }}"
|
||||
<input id="radio-{{engine}}" type="radio" name="default-status" value="{{engine}}"
|
||||
{% if profile.engine == engine %}checked{% endif %}>
|
||||
</span>
|
||||
|
||||
<span onclick="deleteRow(event)">
|
||||
<i class="fa-solid fa-trash-can" style="color: #A00000;" data-engine="{{ engine }}" ></i>
|
||||
<i class="fa-solid fa-trash-can" style="color: #A00000;" data-engine="{{engine}}" ></i>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -102,8 +102,6 @@
|
||||
return;
|
||||
|
||||
if (engine) {
|
||||
// Perform the delete action here
|
||||
console.log(`Deleting engine: ${engine}`);
|
||||
|
||||
// Remove the corresponding row from the DOM
|
||||
const row = button.parentNode.parentNode;
|
||||
@@ -115,7 +113,6 @@
|
||||
|
||||
deletedRepos.push(engine);
|
||||
deletedReposInput.value = JSON.stringify(deletedRepos);
|
||||
console.log(deletedRepos);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user