mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-20 04:18:19 -07:00
23677db990
This de-minifies and de-uglifies `controllers` subdirectory
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
define(["components/activitylog", "globalize"], function (ActivityLog, globalize) {
|
|
"use strict";
|
|
|
|
return function (view, params) {
|
|
var activityLog;
|
|
|
|
if (params.useractivity !== "false") {
|
|
view.querySelector(".activityItems").setAttribute("data-useractivity", "true");
|
|
view.querySelector(".sectionTitle").innerHTML = globalize.translate("HeaderActivity");
|
|
} else {
|
|
view.querySelector(".activityItems").setAttribute("data-useractivity", "false");
|
|
view.querySelector(".sectionTitle").innerHTML = globalize.translate("Alerts");
|
|
}
|
|
|
|
view.addEventListener("viewshow", function () {
|
|
if (!activityLog) {
|
|
activityLog = new ActivityLog({
|
|
serverId: ApiClient.serverId(),
|
|
element: view.querySelector(".activityItems")
|
|
});
|
|
}
|
|
});
|
|
view.addEventListener("viewdestroy", function () {
|
|
if (activityLog) {
|
|
activityLog.destroy();
|
|
}
|
|
|
|
activityLog = null;
|
|
});
|
|
};
|
|
});
|