mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update activitylog Suggested change
This commit is contained in:
parent
a971c33b1e
commit
d30ca44997
1 changed files with 5 additions and 3 deletions
|
@ -57,9 +57,9 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific
|
||||||
var hasUserId = "false" !== elem.getAttribute("data-useractivity");
|
var hasUserId = "false" !== elem.getAttribute("data-useractivity");
|
||||||
|
|
||||||
if (hasUserId) {
|
if (hasUserId) {
|
||||||
minDate.setTime(minDate.getTime() - 864e5);
|
minDate.setTime(minDate.getTime() - 24 * 60 * 60 * 1000); // one day back
|
||||||
} else {
|
} else {
|
||||||
minDate.setTime(minDate.getTime() - 6048e5);
|
minDate.setTime(minDate.getTime() - 7 * 24 * 60 * 60 * 1000); // one week back
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.getJSON(ApiClient.getUrl("System/ActivityLog/Entries", {
|
ApiClient.getJSON(ApiClient.getUrl("System/ActivityLog/Entries", {
|
||||||
|
@ -68,7 +68,9 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific
|
||||||
minDate: minDate.toISOString(),
|
minDate: minDate.toISOString(),
|
||||||
hasUserId: hasUserId
|
hasUserId: hasUserId
|
||||||
})).then(function (result) {
|
})).then(function (result) {
|
||||||
if (elem.setAttribute("data-activitystartindex", startIndex), elem.setAttribute("data-activitylimit", limit), !startIndex) {
|
elem.setAttribute("data-activitystartindex", startIndex);
|
||||||
|
elem.setAttribute("data-activitylimit", limit);
|
||||||
|
if (!startIndex) {
|
||||||
var activityContainer = dom.parentWithClass(elem, "activityContainer");
|
var activityContainer = dom.parentWithClass(elem, "activityContainer");
|
||||||
|
|
||||||
if (activityContainer) {
|
if (activityContainer) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue