decord/source/modules/auth_sessions/AuthSessionsStore.tsx

55 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 14093
// Function ID: 14094
2026-07-29 08:29:29 +00:00
// Name: handleInit
// Dependencies: [589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-15 05:55:55 +00:00
// Module 14093 (handleInit)
2026-07-29 08:29:29 +00:00
import { Store } from "initialize";
2026-07-20 16:05:17 +00:00
function handleInit() {
2026-07-29 08:29:29 +00:00
let closure_0 = [];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let closure_0 = [];
class AuthSessionsStore extends Store {
}
AuthSessionsStore.prototype["getSessions"] = function getSessions() {
return closure_0;
};
AuthSessionsStore.displayName = "AuthSessionsStore";
const authSessionsStore = new AuthSessionsStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
LOGOUT: handleInit,
LOGIN_SUCCESS: handleInit,
FETCH_AUTH_SESSIONS_SUCCESS: function handleFetchAuthSessionsSuccess(sessions) {
sessions = sessions.sessions;
2026-07-29 08:29:29 +00:00
let 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;
let c1;
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) {
const items = item10014;
const findIndexResult = items.findIndex((id_hash) => id_hash.id_hash === closure_0);
if (findIndexResult >= 0) {
items.splice(findIndexResult, 1);
let c1 = true;
}
})(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;