Added new FATAL view to display information when a distro load fails. This replaces the overlay behavior used on v1. The fatal view will eventually do an update check and allow the user to update the app. This solves a potential issue of a user using a very outdated launcher version, and the distro failing as a result. Added new wrapper classes to store the distribution in the redux store.
15 lines
418 B
TypeScript
15 lines
418 B
TypeScript
import { Reducer } from 'redux'
|
|
import { View } from '../../meta/Views'
|
|
import { ChangeViewAction, ViewActionType } from '../actions/viewActions'
|
|
|
|
const defaultView = View.NONE
|
|
|
|
const ViewReducer: Reducer<View, ChangeViewAction> = (state = defaultView, action) => {
|
|
switch(action.type) {
|
|
case ViewActionType.ChangeView:
|
|
return action.payload
|
|
}
|
|
return state
|
|
}
|
|
|
|
export default ViewReducer |