decord/alpha/source/stores/StatusPageStore.tsx

81 lines
2.3 KiB
TypeScript
Raw Normal View History

// Module ID: 14033
// Function ID: 14034
// Name: StatusPageStore
// Dependencies: [510, 504, 573, 2]
2026-07-20 16:05:17 +00:00
// Module 14033 (StatusPageStore)
import initializeDefault from "initialize" /* 504 */;
import Storage2 from "Storage" /* 510 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-07-29 08:29:29 +00:00
const MaintenanceStore = "MaintenanceStore";
let incident = null;
let maintenance = null;
let id = null;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class MaintenanceStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = MaintenanceStore.prototype;
prototype["initialize"] = function initialize() {
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
id = Storage.get(MaintenanceStore);
2026-07-29 08:29:29 +00:00
};
prototype["getIncident"] = function getIncident() {
return incident;
2026-07-29 08:29:29 +00:00
};
prototype["getScheduledMaintenance"] = function getScheduledMaintenance() {
let scheduled_until;
if (maintenance != null) {
scheduled_until = maintenance.scheduled_until;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +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-07-29 08:29:29 +00:00
scheduled_until = scheduled_for;
}
let tmp3 = null;
if (null != maintenance) {
2026-07-29 08:29:29 +00:00
tmp3 = null;
if (maintenance.id !== id) {
2026-07-20 16:05:17 +00:00
if (null == scheduled_until) {
tmp3 = maintenance;
2026-07-29 08:29:29 +00:00
} else {
const _Date = Date;
const _Date2 = Date;
const timestamp = Date.now();
const date = new Date(scheduled_until);
2026-07-20 16:05:17 +00:00
tmp3 = null;
}
}
2026-07-29 08:29:29 +00:00
}
return tmp3;
};
MaintenanceStore.displayName = "MaintenanceStore";
const maintenanceStore = new MaintenanceStore(DispatcherDefault, {
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-07-29 08:29:29 +00:00
const result = Storage.set(MaintenanceStore, id);
2026-07-20 16:05:17 +00:00
}
}
});
const size = fn(2);
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;