mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
fix: missing date-added field in web torrent inspector (#5386)
This commit is contained in:
parent
8dbf40613a
commit
ce316309e7
1 changed files with 13 additions and 0 deletions
|
@ -115,6 +115,7 @@ export class Inspector extends EventTarget {
|
||||||
['hash', 'Hash:'],
|
['hash', 'Hash:'],
|
||||||
['privacy', 'Privacy:'],
|
['privacy', 'Privacy:'],
|
||||||
['origin', 'Origin:'],
|
['origin', 'Origin:'],
|
||||||
|
['dateAdded', 'Date added:'],
|
||||||
['magnetLink', 'Magnet:'],
|
['magnetLink', 'Magnet:'],
|
||||||
['comment', 'Comment:'],
|
['comment', 'Comment:'],
|
||||||
['labels', 'Labels:'],
|
['labels', 'Labels:'],
|
||||||
|
@ -541,6 +542,18 @@ export class Inspector extends EventTarget {
|
||||||
}
|
}
|
||||||
setTextContent(e.info.location, string);
|
setTextContent(e.info.location, string);
|
||||||
|
|
||||||
|
// dateAdded
|
||||||
|
if (torrents.length === 0) {
|
||||||
|
string = none;
|
||||||
|
} else {
|
||||||
|
const get = (t) => t.getDateAdded();
|
||||||
|
const first = get(torrents[0]);
|
||||||
|
string = torrents.every((t) => get(t) === first)
|
||||||
|
? new Date(first * 1000).toDateString()
|
||||||
|
: mixed;
|
||||||
|
}
|
||||||
|
setTextContent(e.info.dateAdded, string);
|
||||||
|
|
||||||
// magnetLink
|
// magnetLink
|
||||||
if (torrents.length === 0) {
|
if (torrents.length === 0) {
|
||||||
setTextContent(e.info.magnetLink, none);
|
setTextContent(e.info.magnetLink, none);
|
||||||
|
|
Loading…
Reference in a new issue