feat: Add ability to configure and test SMTP via UI
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const updateConfig = (data) => ({
|
||||
type: ActionTypes.CONFIG_UPDATE,
|
||||
payload: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
updateConfig.success = (config) => ({
|
||||
type: ActionTypes.CONFIG_UPDATE__SUCCESS,
|
||||
payload: {
|
||||
config,
|
||||
},
|
||||
});
|
||||
|
||||
updateConfig.failure = (error) => ({
|
||||
type: ActionTypes.CONFIG_UPDATE__FAILURE,
|
||||
payload: {
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
const handleConfigUpdate = (config) => ({
|
||||
type: ActionTypes.CONFIG_UPDATE_HANDLE,
|
||||
payload: {
|
||||
config,
|
||||
},
|
||||
});
|
||||
|
||||
const testSmtpConfig = () => ({
|
||||
type: ActionTypes.SMTP_CONFIG_TEST,
|
||||
payload: {},
|
||||
});
|
||||
|
||||
testSmtpConfig.success = (logs) => ({
|
||||
type: ActionTypes.SMTP_CONFIG_TEST__SUCCESS,
|
||||
payload: {
|
||||
logs,
|
||||
},
|
||||
});
|
||||
|
||||
testSmtpConfig.failure = (error) => ({
|
||||
type: ActionTypes.SMTP_CONFIG_TEST__FAILURE,
|
||||
payload: {
|
||||
error,
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
updateConfig,
|
||||
handleConfigUpdate,
|
||||
testSmtpConfig,
|
||||
};
|
||||
@@ -6,6 +6,7 @@
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const initializeCore = (
|
||||
config,
|
||||
user,
|
||||
board,
|
||||
webhooks,
|
||||
@@ -32,6 +33,7 @@ const initializeCore = (
|
||||
) => ({
|
||||
type: ActionTypes.CORE_INITIALIZE,
|
||||
payload: {
|
||||
config,
|
||||
user,
|
||||
board,
|
||||
webhooks,
|
||||
@@ -58,10 +60,10 @@ const initializeCore = (
|
||||
},
|
||||
});
|
||||
|
||||
initializeCore.fetchConfig = (config) => ({
|
||||
type: ActionTypes.CORE_INITIALIZE__CONFIG_FETCH,
|
||||
initializeCore.fetchBootstrap = (bootstrap) => ({
|
||||
type: ActionTypes.CORE_INITIALIZE__BOOTSTRAP_FETCH,
|
||||
payload: {
|
||||
config,
|
||||
bootstrap,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import socket from './socket';
|
||||
import login from './login';
|
||||
import core from './core';
|
||||
import modals from './modals';
|
||||
import config from './config';
|
||||
import webhooks from './webhooks';
|
||||
import users from './users';
|
||||
import projects from './projects';
|
||||
@@ -36,6 +37,7 @@ export default {
|
||||
...login,
|
||||
...core,
|
||||
...modals,
|
||||
...config,
|
||||
...webhooks,
|
||||
...users,
|
||||
...projects,
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
|
||||
const initializeLogin = (config) => ({
|
||||
const initializeLogin = (bootstrap) => ({
|
||||
type: ActionTypes.LOGIN_INITIALIZE,
|
||||
payload: {
|
||||
config,
|
||||
bootstrap,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ const handleSocketDisconnect = () => ({
|
||||
});
|
||||
|
||||
const handleSocketReconnect = (
|
||||
bootstrap,
|
||||
config,
|
||||
user,
|
||||
board,
|
||||
@@ -38,6 +39,7 @@ const handleSocketReconnect = (
|
||||
) => ({
|
||||
type: ActionTypes.SOCKET_RECONNECT_HANDLE,
|
||||
payload: {
|
||||
bootstrap,
|
||||
config,
|
||||
user,
|
||||
board,
|
||||
|
||||
@@ -65,6 +65,7 @@ const handleUserUpdate = (
|
||||
user,
|
||||
projectIds,
|
||||
boardIds,
|
||||
bootstrap,
|
||||
config,
|
||||
board,
|
||||
webhooks,
|
||||
@@ -94,6 +95,7 @@ const handleUserUpdate = (
|
||||
user,
|
||||
projectIds,
|
||||
boardIds,
|
||||
bootstrap,
|
||||
config,
|
||||
board,
|
||||
webhooks,
|
||||
|
||||
Reference in New Issue
Block a user