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

Commit3d63d12

Browse files
committed
refactor actions
1 parent689d83f commit3d63d12

File tree

8 files changed

+9
-12
lines changed

8 files changed

+9
-12
lines changed

‎lib/actions/_types.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ exports.COMPLETE_PAGE = 'COMPLETE_PAGE';
55
exports.COMPLETE_TUTORIAL='COMPLETE_TUTORIAL';
66
exports.DEVTOOLS_TOGGLE='DEVTOOLS_TOGGLE';
77
exports.HINT_POSITION_SET='HINT_POSITION_SET';
8-
exports.HINT_SHOW='HINT_SHOW';
98
exports.PAGE_SET='PAGE_SET';
109
exports.PAGE_POSITION_SET='POSITION_SET';
1110
exports.PROGRESS_LOAD='PROGRESS_LOAD';

‎lib/actions/hint.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ function hintPositionSet(hintPosition) {
44
return{type:_types_1.HINT_POSITION_SET,payload:{hintPosition:hintPosition}};
55
}
66
exports.hintPositionSet=hintPositionSet;
7-
functionhintShow(){
8-
return{type:_types_1.HINT_SHOW};
9-
}
10-
exports.hintShow=hintShow;

‎lib/actions/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ exports.completePage = progress_1.completePage;
88
exports.completeTutorial=progress_1.completeTutorial;
99
exports.progressPagePositionLoad=progress_1.progressPagePositionLoad;
1010
varhint_1=require('./hint');
11-
exports.hintShow=hint_1.hintShow;
1211
exports.hintPositionSet=hint_1.hintPositionSet;
1312
varpage_1=require('./page');
1413
exports.pageSet=page_1.pageSet;

‎lib/actions/tutorial.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
"use strict";
22
var_types_1=require('./_types');
3+
varprogress_1=require('./progress');
4+
varroute_1=require('./route');
35
functiontutorialSet(name){
46
returnfunction(dispatch,getState){
57
vardir=getState().dir;
68
dispatch({type:_types_1.TUTORIAL_SET,payload:{name:name,dir:dir}});
9+
dispatch(progress_1.progressLoad());
10+
dispatch(route_1.routeSet('progress'));
711
};
812
}
913
exports.tutorialSet=tutorialSet;

‎src/actions/_types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export const COMPLETE_PAGE = 'COMPLETE_PAGE';
44
exportconstCOMPLETE_TUTORIAL='COMPLETE_TUTORIAL';
55
exportconstDEVTOOLS_TOGGLE='DEVTOOLS_TOGGLE';
66
exportconstHINT_POSITION_SET='HINT_POSITION_SET';
7-
exportconstHINT_SHOW='HINT_SHOW';
87
exportconstPAGE_SET='PAGE_SET';
98
exportconstPAGE_POSITION_SET='POSITION_SET';
109
exportconstPROGRESS_LOAD='PROGRESS_LOAD';

‎src/actions/hint.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@ import {HINT_SHOW, HINT_POSITION_SET} from './_types';
33
exportfunctionhintPositionSet(hintPosition:number):Action{
44
return{type:HINT_POSITION_SET,payload:{ hintPosition}};
55
}
6-
7-
exportfunctionhintShow():Action{
8-
return{type:HINT_SHOW};
9-
}

‎src/actions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export {
33
progressLoad,completePage,completeTutorial,
44
progressPagePositionLoad
55
}from'./progress';
6-
export{hintShow,hintPositionSet}from'./hint';
6+
export{hintPositionSet}from'./hint';
77
export{pageSet,pageNext,pagePositionSet}from'./page';
88
export{routeSet}from'./route';
99
export{setupVerify,setupPackage}from'./setup';

‎src/actions/tutorial.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import {
22
TUTORIALS_FIND,TUTORIAL_UPDATE,TUTORIAL_SET,
33
ALERT_TOGGLE
44
}from'./_types';
5+
import{progressLoad}from'./progress';
6+
import{routeSet}from'./route';
57

68
exportfunctiontutorialSet(name:string):ReduxThunk.ThunkInterface{
79
return(dispatch,getState):void=>{
810
const{dir}=getState();
911
dispatch({type:TUTORIAL_SET,payload:{ name, dir}});
12+
dispatch(progressLoad());
13+
dispatch(routeSet('progress'));
1014
};
1115
}
1216

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp