decord/alpha/source/stores/StatusPageStore.tsx

83 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 13876
// Function ID: 13877
// Name: StatusPageStore
2026-10-03 08:58:59 +00:00
// Dependencies: [510, 504, 584, 2]
2026-07-20 16:05:17 +00:00
2026-10-08 09:57:35 +00:00
// Module 13876 (StatusPageStore)
2026-10-03 08:58:59 +00:00
import get_initializedDefault from "get initialized" /* 504 */;
import Storage2 from "Storage" /* 510 */;
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const MaintenanceStore_str = "MaintenanceStore";
let incident = null;
let maintenance = null;
let id = null;
2026-10-03 08:58:59 +00:00
const Store = get_initializedDefault.Store;
2026-07-29 08:29:29 +00:00
class MaintenanceStore extends Store {
2026-10-03 08:58:59 +00:00
initialize() {
const Storage = Storage2.Storage;
id = Storage.get(MaintenanceStore_str);
}
getIncident() {
return incident;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
getScheduledMaintenance() {
let scheduled_until;
if (maintenance != null) {
2026-10-03 08:58:59 +00:00
scheduled_until = maintenance.scheduled_until;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
if (scheduled_until == null) {
let scheduled_for;
if (maintenance != null) {
scheduled_for = maintenance.scheduled_for;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
scheduled_until = scheduled_for;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
let tmp3 = null;
if (null != maintenance) {
tmp3 = null;
if (maintenance.id !== id) {
if (null == scheduled_until) {
tmp3 = maintenance;
} else {
const _Date = Date;
const _Date2 = Date;
const self = this;
const self2 = this;
const timestamp = Date.now();
new Date(scheduled_until);
tmp3 = null;
}
}
}
return tmp3;
2026-07-29 08:29:29 +00:00
}
2026-10-03 08:58:59 +00:00
}
const prototype = MaintenanceStore.prototype;
2026-07-29 08:29:29 +00:00
MaintenanceStore.displayName = "MaintenanceStore";
2026-10-03 08:58:59 +00:00
const obj = {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen() {
incident = null;
2026-07-20 16:05:17 +00:00
},
STATUS_PAGE_INCIDENT: function handleIncident(incident) {
incident = incident.incident;
},
STATUS_PAGE_SCHEDULED_MAINTENANCE: function handleScheduledMaintenance(maintenance) {
maintenance = maintenance.maintenance;
},
STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK: function handleScheduledMaintenanceAck() {
if (null == maintenance) {
2026-07-20 16:05:17 +00:00
return false;
} else {
id = maintenance.id;
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
2026-10-03 08:58:59 +00:00
const result = Storage.set(MaintenanceStore_str, id);
2026-07-20 16:05:17 +00:00
}
}
2026-10-03 08:58:59 +00:00
};
const maintenanceStore = new MaintenanceStore(DispatcherDefault, obj);
let result = size.fileFinishedImporting("stores/StatusPageStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default maintenanceStore;