decord/source/modules/auth_sessions/AuthSessionsStore.tsx

57 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 14191
// Function ID: 14192
2026-07-29 08:29:29 +00:00
// Name: handleInit
// Dependencies: [589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 14191 (handleInit)
2026-08-24 06:08:38 +00:00
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-07-20 16:05:17 +00:00
function handleInit() {
2026-08-24 06:08:38 +00:00
closure_0 = [];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let closure_0 = [];
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class AuthSessionsStore extends Store {
}
AuthSessionsStore.prototype["getSessions"] = function getSessions() {
return closure_0;
};
AuthSessionsStore.displayName = "AuthSessionsStore";
2026-08-24 06:08:38 +00:00
const authSessionsStore = new AuthSessionsStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
LOGOUT: handleInit,
LOGIN_SUCCESS: handleInit,
FETCH_AUTH_SESSIONS_SUCCESS: function handleFetchAuthSessionsSuccess(sessions) {
sessions = sessions.sessions;
2026-08-24 06:08:38 +00:00
closure_0 = sessions.map((approx_last_used_time) => {
2026-07-20 16:05:17 +00:00
const obj = {};
const merged = Object.assign(approx_last_used_time);
2026-07-29 08:29:29 +00:00
obj.approx_last_used_time = new Date(approx_last_used_time.approx_last_used_time);
2026-07-20 16:05:17 +00:00
return obj;
});
},
2026-07-29 08:29:29 +00:00
LOGOUT_AUTH_SESSIONS_SUCCESS: function handleLogoutAuthSessionsSuccess(arg0) {
let items;
2026-08-24 06:08:38 +00:00
c1 = undefined;
2026-07-23 10:11:24 +00:00
items = [...items];
2026-07-29 08:29:29 +00:00
c1 = false;
for (const item10014 of tmp) {
let tmp2 = (function _loop(item10014) {
2026-08-24 06:08:38 +00:00
items = item10014;
2026-07-29 08:29:29 +00:00
const findIndexResult = items.findIndex((id_hash) => id_hash.id_hash === closure_0);
if (findIndexResult >= 0) {
items.splice(findIndexResult, 1);
2026-08-24 06:08:38 +00:00
c1 = true;
2026-07-29 08:29:29 +00:00
}
})(item10014);
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (!c1) {
2026-07-20 16:05:17 +00:00
return false;
}
}
});
2026-07-29 08:29:29 +00:00
const result = require("set").fileFinishedImporting("modules/auth_sessions/AuthSessionsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default authSessionsStore;