* 🚥 Added service status panel scaffold * 🐂 Support for showing import progress * 🐂 Support for session-tracking * 🔧 Tooling for resumable socket.io sessions * 🧹 Minor change in socket.io connection code * 🔧 Refactoring the Import Page * 📝 Added more details to import statuses * 🐂 Queue pause/resume functionality * 🐂 Queue drain event reducer * 🐂 Queue controls * 🔧 Hardening the import UX * 🔀 Bumped deps * 🔧 Fixed the airdcpp-apisocket version * ⛑️ Removed useless deps * 🪡 Fixed margin on the comicinfo.xml panel on the library page * 🏗️ Scaffold for job results * 🔢 Removed the useless LS_IMPORT event * 🔧 Wired up jobStatistics call * 🧹 Cleaning up the tabulated job results * 🔧 More finishing touches to Import UX * 🔧 Added a console log for debugging purposes --------- Co-authored-by: Rishi Ghan <hghan@apple.com>
12 lines
285 B
TypeScript
12 lines
285 B
TypeScript
const socketIOMiddleware = (socket) => {
|
|
return (store) => (next) => (action) => {
|
|
if (action.type === "EMIT_SOCKET_EVENT") {
|
|
const { event, data } = action.payload;
|
|
socket.emit(event, data);
|
|
}
|
|
return next(action);
|
|
};
|
|
};
|
|
|
|
export default socketIOMiddleware;
|