How to use reapop - 10 common examples

To help you get started, we’ve selected a few reapop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kthulu120 / liquid_dl / assets / js / utility / ListValidation.js View on Github external
export const FFMPEGSubmisison = () => {
    let state = store.getState();
    state = validateFFMPEG(state);
    console.log(state);
    store.dispatch(notify({
        title: 'SUCCESS',
        message: 'Sent Command, now processing, notification will be sent when completed',
        status: 'info',
        dismissible: true,
        "buttons": [{
            "name": "OK",
            "primary": true
        }]
    }));
    $.ajax({

        url: 'http://127.0.0.1:8000/liquid-dl/ffmpeg-submit',
        type: 'GET',
        data: {
            inputFormat: state.ffmpeg.inputFormat,
            input_path: state.ffmpeg.input_path,
github hooram / ownphotos-frontend / src / actions / photosActions.js View on Github external
.then(response => {
        dispatch({
          type: "SET_PHOTOS_HIDDEN_FULFILLED",
          payload: {
            image_hashes: image_hashes,
            hidden: hidden,
            updatedPhotos: response.data.updated
          }
        });
        if (hidden) {
          var notificationMessage = "were successfully hidden";
        } else {
          var notificationMessage = "were successfully unhidden";
        }
        dispatch(
          notify({
            message: `${response.data.updated.length} photo(s) ` + notificationMessage,
            title: "Hide photos",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br"
          })
        );
        if (image_hashes.length === 1) {
          dispatch(fetchPhotoDetail(image_hashes[0]));
        }
      })
      .catch(err => {
github hooram / ownphotos-frontend / src / actions / utilActions.js View on Github external
.then(response => {
        dispatch(
          notify({
            message: "Generate Event Albums started",
            title: "Generate Event Albums",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br"
          })
        );
        dispatch({
          type: "GENERATE_EVENT_ALBUMS_FULFILLED",
          payload: response.data
        });
      })
      .catch(err => {
github hooram / ownphotos-frontend / src / actions / albumsActions.js View on Github external
.then(response => {
        dispatch({
          type: "EDIT_USER_ALBUMS_LIST_FULFILLED",
          payload: response.data
        });
        dispatch(
          notify({
            message: `${
              image_hashes.length
            } photo(s) were successfully added to existing album "${title}"`,
            title: "Add to album",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br",
            buttons:[{
              name:'View Album', 
              primary:true, 
              onClick: ()=>{
                dispatch(fetchUserAlbum(album_id))
                dispatch(push(`/useralbum/${album_id}/`))
              }
            }]
github hooram / ownphotos-frontend / src / actions / facesActions.js View on Github external
.then(response => {
        dispatch({
          type: "DELETE_FACES_FULFILLED",
          payload: response.data.results
        });
        dispatch(
          notify({
            message: `${
              response.data.results.length
            } face(s) were successfully deleted`,
            title: "Face delete",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br"
          })
        );
      })
      .catch(err => {
github blockstack / blockstack-browser / app / js / profiles / store / registration / actions.js View on Github external
zoneFile
        )

        if (res.error) {
          logger.error(res.error)
          let message =
            `Sorry, something went wrong while registering ${domainName}. ` +
            'You can try to register again later from your profile page. Some ' +
            'apps may be unusable until you do.'
          if (res.status === 409) {
            message =
              "Sorry, it looks like we weren't able to process your name registration. Please contact us at support@blockstack.org for help. Some apps may be unusable until you register an ID."
          }
          dispatch(registrationError(message))
          dispatch(
            notify({
              title: 'Username Registration Failed',
              message,
              status: 'error',
              dismissAfter: 6000,
              dismissible: true,
              closeButton: true,
              position: 'b'
            })
          )
        } else {
          logger.debug(`Successfully submitted registration for ${domainName}`)
          dispatch(registrationSubmitted())
          dispatch(IdentityActions.addUsername(identityIndex, domainName))
        }
      } catch (e) {
        logger.error('registerName: error POSTing registration to registrar', e)
github zhuyst / SkyBlog / client_web / src / reducer / AppReducer.js View on Github external
const AppReducer = combineReducers({
    navigation : NavigationReducer,
    articles : ArticlesReducer,
    content : ContentReducer,
    upload : UploadReducer,
    login : LoginReducer,
    users : UsersReducer,
    classify : ClassifyReducer,
    about : AboutReducer,
    msg : MsgBoardReducer,
    github : GithubReducer,
    sys_log : SysLogReducer,
    access_log : AccessLogReducer,
    form : formReducer,
    router: routerReducer,
    notifications: notificationsReducer()
});

export default AppReducer
github Kthulu120 / liquid_dl / assets / js / reducers / index.js View on Github external
import {combineReducers} from 'redux'
import {reducer as notificationsReducer} from 'reapop';
import soundcloud from "./soundcloud";
import imgurscraper from "./imgurscraper";
import ffmpeg from "./ffmpeg";
import global from './global'
import wget from "./wget";
import youtube_dl from "./youtubedl"
import download_manager from "./download_manager";

const todoApp = combineReducers({
    notifications: notificationsReducer(),
    soundcloud: soundcloud,
    ffmpeg: ffmpeg,
    global: global,
    wget: wget,
    youtube_dl: youtube_dl,
    download_manager: download_manager
});

export default todoApp
github blockstack / blockstack-browser / app / js / store / reducers.js View on Github external
/**
 * Incrementing this triggers an upgrade process
 * where the user has to enter their password, critical state is migrated
 * and other state is regenerated.
 * @type {number}
 */
export const CURRENT_VERSION: number = 18

const AppReducer = combineReducers({
  account: AccountReducer,
  auth: AuthReducer,
  apps: AppsReducer,
  profiles: ProfilesReducer,
  sanity: SanityReducer,
  settings: SettingsReducer,
  notifications: makeNotificationsReducer()
})

function reducer(state: any, action: any) {
  let newState: any = Object.assign({}, state)
  if (action.type === UPDATE_STATE) {
    const initialState = AppReducer(undefined, {})

    const preservedApiSettingsState = {
      gaiaHubUrl: state.settings.api.gaiaHubUrl,
      distinctEventId: state.settings.api.distinctEventId,
      hasDisabledEventTracking: state.settings.api.hasDisabledEventTracking
    }

    const newApiSettingsState = Object.assign(DEFAULT_API, preservedApiSettingsState)

    newState = Object.assign({}, initialState, {
github hooram / ownphotos-frontend / src / reducers / index.js View on Github external
import pub from './publicReducer'
import user from './userReducer'

const appReducer = combineReducers({
  people,
  faces,
  albums,
  util,
  photos,
  auth,
  search,
  routerReducer,
  ui,
  pub,
  user,
  notifications: notificationsReducer()
  
})

export default (state,action) => {
	if (action.type === 'LOGOUT') {
		state = {}
	}

	return appReducer(state,action)
}

export const isAuthenticated =
    state => fromAuth.isAuthenticated(state.auth)
export const accessToken = 
    state => fromAuth.accessToken(state.auth)
export const isAccessTokenExpired =

reapop

A simple & customizable notifications system for React

MIT
Latest version published 8 months ago

Package Health Score

71 / 100
Full package analysis