feat: Version 2

Closes #627, closes #1047
This commit is contained in:
Maksim Eltyshev
2025-05-10 02:09:06 +02:00
parent ad7fb51cfa
commit 2ee1166747
1557 changed files with 76832 additions and 47042 deletions
+40 -5
View File
@@ -1,24 +1,34 @@
/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
import { call, put, select } from 'redux-saga/effects';
import request from '../request';
import requests from '../requests';
import selectors from '../../../selectors';
import actions from '../../../actions';
import api from '../../../api';
export function* handleSocketDisconnect() {
yield put(actions.handleSocketDisconnect());
}
export function* handleSocketReconnect() {
const currentUserId = yield select(selectors.selectCurrentUserId);
const { boardId } = yield select(selectors.selectPath);
const currentUserId = yield select(selectors.selectCurrentUserId);
yield put(actions.handleSocketReconnect.fetchCore(currentUserId, boardId));
let config;
let user;
let board;
let users;
let projects;
let projectManagers;
let backgroundImages;
let baseCustomFieldGroups;
let boards;
let boardMemberships;
let labels;
@@ -26,18 +36,26 @@ export function* handleSocketReconnect() {
let cards;
let cardMemberships;
let cardLabels;
let taskLists;
let tasks;
let attachments;
let activities;
let customFieldGroups;
let customFields;
let customFieldValues;
let notifications;
let notificationServices;
try {
({ item: config } = yield call(request, api.getConfig));
({
user,
board,
users,
projects,
projectManagers,
backgroundImages,
baseCustomFieldGroups,
boards,
boardMemberships,
labels,
@@ -45,22 +63,29 @@ export function* handleSocketReconnect() {
cards,
cardMemberships,
cardLabels,
taskLists,
tasks,
attachments,
activities,
customFieldGroups,
customFields,
customFieldValues,
notifications,
notificationServices,
} = yield call(requests.fetchCore));
} catch (error) {
} catch {
return;
}
yield put(
actions.handleSocketReconnect(
config,
user,
board,
users,
projects,
projectManagers,
backgroundImages,
baseCustomFieldGroups,
boards,
boardMemberships,
labels,
@@ -68,12 +93,22 @@ export function* handleSocketReconnect() {
cards,
cardMemberships,
cardLabels,
taskLists,
tasks,
attachments,
activities,
customFieldGroups,
customFields,
customFieldValues,
notifications,
notificationServices,
),
);
const isAvailableForCurrentUser = yield select(selectors.isCurrentModalAvailableForCurrentUser);
if (!isAvailableForCurrentUser) {
yield put(actions.closeModal());
}
}
export default {