mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
show notification on compile error
This commit is contained in:
committed by
David Lechner
parent
16b8f71d81
commit
6c849b50f0
@@ -8,6 +8,7 @@ import {
|
||||
BootloaderConnectionActionType,
|
||||
BootloaderConnectionFailureReason,
|
||||
} from '../actions/lwp3-bootloader';
|
||||
import { MpyActionType } from '../actions/mpy';
|
||||
import { NotificationActionType } from '../actions/notification';
|
||||
import { ServiceWorkerActionType } from '../actions/service-worker';
|
||||
import { createCountFunc } from '../utils/iter';
|
||||
@@ -87,6 +88,11 @@ const list: Reducer<NotificationList, Action> = (state = [], action) => {
|
||||
return append(state, Level.Error, MessageId.BleConnectFailed);
|
||||
}
|
||||
return state;
|
||||
case MpyActionType.DidFailToCompile:
|
||||
return [
|
||||
...state,
|
||||
{ id: nextId(), level: Level.Error, message: action.err },
|
||||
];
|
||||
case NotificationActionType.Add:
|
||||
return [
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user