Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5cf63b

Browse files
committed
fix alert color issues
1 parentd34e3d0 commitb5cf63b

File tree

20 files changed

+44
-51
lines changed

20 files changed

+44
-51
lines changed

‎lib/actions/page.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ exports.pageNext = pageNext;
1818
functionpageSet(pagePosition){
1919
if(pagePosition===void0){pagePosition=0;}
2020
returnfunction(dispatch,getState){
21-
var_a=getState(),dir=_a.dir,progress=_a.progress,tutorial=_a.tutorial;
22-
vartasks=tutorial.pages[pagePosition].tasks||[];
21+
var_a=getState(),dir=_a.dir,progress=_a.progress,tutorial=_a.tutorial,route=_a.route;
22+
console.log(pagePosition,dir,progress,tutorial,route);
2323
if(pagePosition>=progress.pages.length){
2424
dispatch({type:_types_1.ROUTE_SET,payload:{route:'final'}});
2525
}
26+
dispatch(hint_1.hintPositionSet(0));
27+
vartasks=tutorial.pages[pagePosition].tasks||[];
2628
dispatch({
2729
type:_types_1.PAGE_SET,payload:{dir:dir,pagePosition:pagePosition,tutorial:tutorial,progress:progress,tasks:tasks}
2830
});
29-
dispatch(hint_1.hintPositionSet(0));
3031
};
3132
}
3233
exports.pageSet=pageSet;

‎lib/components/AppMenu/Quit/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ var Quit = (function (_super) {
3232
Quit=__decorate([
3333
react_redux_1.connect(null,function(dispatch){
3434
return{
35-
quit:function(){
36-
dispatch(actions_1.quit());
37-
}
35+
quit:function(){returndispatch(actions_1.quit());}
3836
};
3937
}),
4038
__metadata('design:paramtypes',[])

‎lib/components/Common/RouteButton.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
1515
};
1616
varReact=require('react');
1717
varreact_redux_1=require('react-redux');
18-
varactions_1=require('../../actions');
1918
varRaisedButton_1=require('material-ui/RaisedButton');
19+
varactions_1=require('../../actions');
2020
varRouteButton=(function(_super){
2121
__extends(RouteButton,_super);
2222
functionRouteButton(){
@@ -29,7 +29,7 @@ var RouteButton = (function (_super) {
2929
RouteButton=__decorate([
3030
react_redux_1.connect(null,function(dispatch){
3131
return{
32-
routeTo:function(route){returndispatch(actions_1.routeSet(route));},
32+
routeTo:function(route){returndispatch(actions_1.routeSet(route));}
3333
};
3434
}),
3535
__metadata('design:paramtypes',[])

‎lib/components/Page/PageToolbar/Continue/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var RaisedButton_1 = require('material-ui/RaisedButton');
1919
varactions_1=require('../../../../actions');
2020
varstyles={
2121
zIndex:'10000',
22-
border:'0',
22+
border:'0px',
2323
boxShadow:'none',
2424
backgroundColor:'inherit',
2525
position:'relative',
@@ -36,9 +36,7 @@ var Continue = (function (_super) {
3636
Continue=__decorate([
3737
react_redux_1.connect(null,function(dispatch,state){
3838
return{
39-
callNextPage:function(){
40-
dispatch(actions_1.pageNext());
41-
}
39+
callNextPage:function(){returndispatch(actions_1.pageNext());}
4240
};
4341
}),
4442
__metadata('design:paramtypes',[])

‎lib/components/Page/PageToolbar/Save/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var react_redux_1 = require('react-redux');
1818
varRaisedButton_1=require('material-ui/RaisedButton');
1919
varactions_1=require('../../../../actions');
2020
varstyles={
21-
border:'0',
21+
border:'0px',
2222
boxShadow:'none',
2323
backgroundColor:'inherit',
2424
position:'relative',
@@ -35,9 +35,7 @@ var Save = (function (_super) {
3535
Save=__decorate([
3636
react_redux_1.connect(null,function(dispatch,state){
3737
return{
38-
save:function(){
39-
dispatch(actions_1.testSave());
40-
}
38+
save:function(){returndispatch(actions_1.testSave());}
4139
};
4240
}),
4341
__metadata('design:paramtypes',[])

‎lib/components/Page/PageToolbar/ToggleLog/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ var ToggleLog = (function (_super) {
3434
ToggleLog=__decorate([
3535
react_redux_1.connect(null,function(dispatch,state){
3636
return{
37-
toggleDevTools:function(){
38-
dispatch(actions_1.devToolsToggle());
39-
}
37+
toggleDevTools:function(){returndispatch(actions_1.devToolsToggle());}
4038
};
4139
}),
4240
__metadata('design:paramtypes',[])

‎lib/reducers/alert/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function setAlert(a) {
2121
varcolor=colors[a.action]||colors.NOTE;
2222
varstatusBarAlert=document.getElementsByClassName('cr-alert-replay')[0];
2323
statusBarAlert.style.color=color;
24+
current=a;
2425
returnObject.assign({},open,a);
2526
}
2627
functionalertReducer(alert,action){

‎src/actions/page.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import{
2-
ROUTE_SET,PAGE_SET,PAGE_POSITION_SET
2+
ROUTE_SET,PAGE_SET
33
}from'./_types';
44
import{hintPositionSet}from'./hint';
5+
import{routeSet}from'./route';
56

67
exportfunctionpageNext():ReduxThunk.ThunkInterface|Action{
78
return(dispatch,getState):void=>{
@@ -18,15 +19,18 @@ export function pageNext(): ReduxThunk.ThunkInterface | Action {
1819

1920
exportfunctionpageSet(pagePosition=0):ReduxThunk.ThunkInterface{
2021
return(dispatch,getState):void=>{
21-
const{dir, progress, tutorial}=getState();
22-
// create absolute paths for 'task-tests'
23-
consttasks=tutorial.pages[pagePosition].tasks||[];
22+
const{dir, progress, tutorial, route}=getState();
23+
console.log(pagePosition,dir,progress,tutorial,route);
24+
25+
// routes
2426
if(pagePosition>=progress.pages.length){
2527
dispatch({type:ROUTE_SET,payload:{route:'final'}});
2628
}
29+
dispatch(hintPositionSet(0));
30+
// create absolute paths for 'task-tests'
31+
consttasks=tutorial.pages[pagePosition].tasks||[];
2732
dispatch({
2833
type:PAGE_SET,payload:{ dir, pagePosition, tutorial, progress, tasks}
2934
});
30-
dispatch(hintPositionSet(0));
3135
};
3236
}

‎src/actions/progress.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import {alertOpen} from './alert';
55
import{testRun}from'./test';
66

77
exportfunctionprogressPagePositionLoad():ReduxThunk.ThunkInterface{
8-
return(dispatch,getState):void=>{
8+
return(dispatch,getState)=>{
99
const{progress}=getState();
1010
dispatch({type:PROGRESS_PAGE_POSITION_LOAD,payload:{ progress}});
1111
};
1212
}
1313

1414
exportfunctionprogressLoad():ReduxThunk.ThunkInterface{
15-
return(dispatch,getState):void=>{
15+
return(dispatch,getState)=>{
1616
const{tutorial}=getState();
1717
dispatch({type:PROGRESS_LOAD,payload:{ tutorial}});
1818
// call pagePositionLoad after progress loads
@@ -22,7 +22,7 @@ export function progressLoad(): ReduxThunk.ThunkInterface {
2222
}
2323

2424
exportfunctioncompletePage(completed=true):ReduxThunk.ThunkInterface{
25-
return(dispatch,getState):void=>{
25+
return(dispatch,getState)=>{
2626
const{pagePosition, progress, tutorial}=getState();
2727
// all pages are true, tutorial complete
2828
dispatch({type:COMPLETE_PAGE,payload:{ pagePosition, tutorial, completed}});
@@ -42,7 +42,7 @@ export function completePage(completed = true): ReduxThunk.ThunkInterface {
4242
}
4343

4444
exportfunctioncompleteTutorial(completed=true):ReduxThunk.ThunkInterface{
45-
return(dispatch,getState):void=>{
45+
return(dispatch,getState)=>{
4646
const{tutorial}=getState();
4747
dispatch({type:COMPLETE_TUTORIAL,payload:{ tutorial, completed}});
4848
dispatch(alertOpen({

‎src/actions/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let previous = null;
66
/* Navigation */
77
exportfunctionrouteSet(route:string):ReduxThunk.ThunkInterface{
88
if(route&&route!==previous){
9-
return(dispatch):void=>{
9+
return(dispatch)=>{
1010
// preloading for routes
1111
switch(route){
1212
case'tutorials':

‎src/actions/tutorial.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ import {routeSet} from './route';
66
import{alertOpen}from'./alert';
77

88
exportfunctiontutorialSet(name:string):ReduxThunk.ThunkInterface{
9-
return(dispatch,getState):void=>{
9+
return(dispatch,getState)=>{
1010
const{dir}=getState();
11-
dispatch({type:TUTORIAL_SET,payload:{name, dir}});
11+
dispatch({type:TUTORIAL_SET,payload:{name, dir}});
1212
dispatch(progressLoad());
1313
dispatch(routeSet('progress'));
1414
};
1515
}
1616

1717
exportfunctiontutorialUpdate(name:string):ReduxThunk.ThunkInterface{
18-
return(dispatch,getState):void=>{
18+
return(dispatch,getState)=>{
1919
constalert={
2020
message:`run \`npm install --save-dev${name}\``,
2121
action:'note',
2222
duration:3000,
2323
};
24-
dispatch({type:TUTORIAL_UPDATE,payload:{ name}});
24+
dispatch({type:TUTORIAL_UPDATE,payload:{ name}});
2525
dispatch(alertOpen(alert));
2626
};
2727
}
2828

2929
exportfunctiontutorialsFind():ReduxThunk.ThunkInterface{
30-
return(dispatch,getState):void=>{
30+
return(dispatch,getState)=>{
3131
const{packageJson, dir}=getState();
3232
dispatch({type:TUTORIALS_FIND,payload:{ packageJson, dir}});
3333
};

‎src/components/AppMenu/MenuLink/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import*asReactfrom'react';
22
import{connect}from'react-redux';
33
importMenuItemfrom'material-ui/MenuItem';
4-
import{pageSet,routeSet}from'../../../actions';
4+
import{routeSet}from'../../../actions';
55

66
conststyles={
77
textAlign:'center',

‎src/components/AppMenu/Quit/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ const styles = {
1010

1111
@connect(null,(dispatch)=>{
1212
return{
13-
quit:()=>{
14-
dispatch(quit());
15-
}
13+
quit:()=>dispatch(quit())
1614
};
1715
})
1816
exportdefaultclassQuitextendsReact.Component<{

‎src/components/Common/RouteButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import*asReactfrom'react';
22
import{connect}from'react-redux';
3-
import{routeSet}from'../../actions';
43
importRaisedButtonfrom'material-ui/RaisedButton';
4+
import{routeSet}from'../../actions';
55

66
@connect(null,dispatch=>{
77
return{
8-
routeTo:(route:string)=>dispatch(routeSet(route)),
8+
routeTo:(route:string)=>dispatch(routeSet(route))
99
};
1010
})
1111
exportdefaultclassRouteButtonextendsReact.Component<{

‎src/components/Page/PageToolbar/Continue/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {pageNext} from '../../../../actions';
55

66
conststyles={
77
zIndex:'10000',
8-
border:'0',
8+
border:'0px',
99
boxShadow:'none',
1010
backgroundColor:'inherit',
1111
position:'relative',
@@ -14,9 +14,7 @@ const styles = {
1414

1515
@connect(null,(dispatch,state)=>{
1616
return{
17-
callNextPage:()=>{
18-
dispatch(pageNext());
19-
}
17+
callNextPage:()=>dispatch(pageNext())
2018
};
2119
})
2220
exportdefaultclassContinueextendsReact.Component<{

‎src/components/Page/PageToolbar/Save/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import RaisedButton from 'material-ui/RaisedButton';
44
import{testSave}from'../../../../actions';
55

66
conststyles={
7-
border:'0',
7+
border:'0px',
88
boxShadow:'none',
99
backgroundColor:'inherit',
1010
position:'relative',
@@ -13,9 +13,7 @@ const styles = {
1313

1414
@connect(null,(dispatch,state)=>{
1515
return{
16-
save:()=>{
17-
dispatch(testSave());
18-
}
16+
save:()=>dispatch(testSave())
1917
};
2018
})
2119
exportdefaultclassSaveextendsReact.Component<{

‎src/components/Page/PageToolbar/ToggleLog/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const styles = {
1111

1212
@connect(null,(dispatch,state)=>{
1313
return{
14-
toggleDevTools:()=>{
15-
dispatch(devToolsToggle());
16-
}
14+
toggleDevTools:()=>dispatch(devToolsToggle())
1715
};
1816
})
1917
exportdefaultclassToggleLogextendsReact.Component<{

‎src/components/Progress/ProgressPage/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default class ProgressPage extends React.Component<{
4040
onClick={
4141
canActivate
4242
?selectPage.bind(this,index)
43+
// do nothing
4344
:function(){return;}
4445
}
4546
/>

‎src/components/Start/Welcome/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as React from 'react';
22
import{join}from'path';
33
import{RouteButton}from'../../index';
44

5+
// TODO: fix path
56
constimagePath=join(
67
__dirname,'../../../../','img','coderoad.jpg'
78
);

‎src/reducers/alert/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function setAlert(a: CR.Alert): CR.Alert {
2727
constcolor=colors[a.action]||colors.NOTE;
2828
letstatusBarAlert=<HTMLElement>document.getElementsByClassName('cr-alert-replay')[0];
2929
statusBarAlert.style.color=color;
30+
current=a;
3031
returnObject.assign({},open,a);
3132
}
3233

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp