rename columns

This commit is contained in:
Mateusz Gruszczyński
2026-05-31 11:02:04 +02:00
parent 37d64079e9
commit 62bc76e806
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ RECOMMENDED_TABLE_COLUMNS = {
"status": True, "size": True, "progress": True, "down_rate": True, "up_rate": True,
"eta": True, "seeds": True, "peers": True, "ratio": True, "path": True, "label": True,
"ratio_group": False, "down_total": True, "to_download": True, "up_total": True,
"created": False, "priority": False, "state": False, "active": False, "complete": False,
"created": False, "last_activity": False, "priority": False, "state": False, "active": False, "complete": False,
"hashing": False, "message": False, "hash": False,
},
"mobileSortFilters": {
@@ -48,7 +48,7 @@ RECOMMENDED_TABLE_COLUMNS = {
"down_rate": 60, "up_rate": 55, "eta": 53, "seeds": 44, "peers": 49,
"ratio": 47, "path": 135, "label": 67, "ratio_group": 87,
"down_total": 82, "to_download": 89, "up_total": 44, "created": 150,
"priority": 80, "state": 70, "active": 70, "complete": 82, "hashing": 82,
"last_activity": 150, "priority": 80, "state": 70, "active": 70, "complete": 82, "hashing": 82,
"message": 220, "hash": 280,
},
}
@@ -403,7 +403,7 @@ def save_profile_preferences(user_id: int, profile_id: int | None, data: dict) -
direction = int(parsed.get("dir") or 1)
except (TypeError, ValueError):
direction = 1
allowed_sort_keys = {"name", "status", "size", "progress", "down_rate", "up_rate", "eta", "seeds", "peers", "ratio", "path", "label", "ratio_group", "down_total", "to_download", "up_total", "created", "priority", "state", "active", "complete", "hashing", "message", "hash"}
allowed_sort_keys = {"name", "status", "size", "progress", "down_rate", "up_rate", "eta", "seeds", "peers", "ratio", "path", "label", "ratio_group", "down_total", "to_download", "up_total", "created", "last_activity", "priority", "state", "active", "complete", "hashing", "message", "hash"}
sort_key = str(parsed.get("key") or "name")
if sort_key not in allowed_sort_keys:
sort_key = "name"
+1 -1
View File
@@ -98,7 +98,7 @@
<th class="sel" data-col="select"><input id="selectAll" type="checkbox"></th>
<th data-sort="name" data-col="name">Name</th><th data-sort="status" data-col="status">Status</th><th data-sort="size" data-col="size">Size</th><th data-sort="progress" data-col="progress">Progress</th>
<th data-sort="down_rate" data-col="down_rate">DL</th><th data-sort="up_rate" data-col="up_rate">UL</th><th data-sort="eta" data-col="eta">ETA</th><th data-sort="seeds" data-col="seeds">Seeds</th><th data-sort="peers" data-col="peers">Peers</th>
<th data-sort="ratio" data-col="ratio">Ratio</th><th data-sort="path" data-col="path">Path</th><th data-sort="label" data-col="label">Label</th><th data-sort="ratio_group" data-col="ratio_group">Ratio group</th><th data-sort="down_total" data-col="down_total">Downloaded</th><th data-sort="to_download" data-col="to_download">To download</th><th data-sort="up_total" data-col="up_total">Uploaded</th><th data-sort="created" data-col="created">Added</th><th data-sort="priority" data-col="priority">Priority</th><th data-sort="state" data-col="state">State</th><th data-sort="active" data-col="active">Active</th><th data-sort="complete" data-col="complete">Complete</th><th data-sort="hashing" data-col="hashing">Hashing</th><th data-sort="message" data-col="message">Message</th><th data-sort="hash" data-col="hash">Hash</th>
<th data-sort="ratio" data-col="ratio">Ratio</th><th data-sort="path" data-col="path">Path</th><th data-sort="label" data-col="label">Label</th><th data-sort="ratio_group" data-col="ratio_group">Ratio group</th><th data-sort="down_total" data-col="down_total">Downloaded</th><th data-sort="to_download" data-col="to_download">To download</th><th data-sort="up_total" data-col="up_total">Uploaded</th><th data-sort="created" data-col="created">Created</th><th data-sort="last_activity" data-col="last_activity">Last activity</th><th data-sort="priority" data-col="priority">Priority</th><th data-sort="state" data-col="state">State</th><th data-sort="active" data-col="active">Active</th><th data-sort="complete" data-col="complete">Complete</th><th data-sort="hashing" data-col="hashing">Hashing</th><th data-sort="message" data-col="message">Message</th><th data-sort="hash" data-col="hash">Hash</th>
</tr></thead>
<tbody id="torrentBody"><tr><td colspan="26" class="empty"><span class="spinner-border spinner-border-sm me-2"></span>Waiting for data.</td></tr></tbody>
</table>