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

Commit47470eb

Browse files
committed
minor fixes
1 parent1204130 commit47470eb

File tree

10 files changed

+1704
-1684
lines changed

10 files changed

+1704
-1684
lines changed

‎lib/components/progress/progress.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
"use strict";
22
var__extends=(this&&this.__extends)||function(d,b){
33
for(varpinb)if(b.hasOwnProperty(p))d[p]=b[p];
44
function__(){this.constructor=d;}
@@ -41,7 +41,10 @@ var ProgressPage = (function (_super) {
4141
}
4242
};
4343
ProgressPage.prototype.canActivate=function(isActive,itemPosition,position){
44-
if(isActive&&itemPosition.chapter<=position.chapter&&itemPosition.page<=position.page){
44+
varearlierChapter=itemPosition.chapter<position.chapter;
45+
varcurrentChapter=itemPosition.chapter=position.chapter;
46+
varearlierOrCurrentPage=itemPosition.page<=position.page;
47+
if(isActive||earlierChapter||(currentChapter&&earlierOrCurrentPage)){
4548
returntrue;
4649
}
4750
else{

‎lib/services/exists.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ function fileExists(pathToFile) {
66
}
77
catch(e){
88
if(e){
9+
if(e.code!=='ENOENT'){
10+
console.log(e);
11+
}
912
returnfalse;
1013
}
1114
}

‎src/components/_index.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
@import'./start/_start';
99

1010
#crv {
11+
min-height:600px;
1112
height:100%;
12-
overflow:scroll;
13+
position:relative;
14+
overflow-y:scroll;
1315
}
1416

1517
#crva,#crva:hover,#crva:visited {

‎src/components/page/_page.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
.cr-page {
22
position:relative;
3-
width:400px;
43
&-toolbar {
54
position:fixed;
65
bottom:0;
76
right:0;
7+
height:60px;
88
width:400px;
99
&-completed {
1010
height:200px;
1111
}
1212
}
1313
}
1414
.cr-tasks {
15+
overflow-y:scroll;
1516
.cr-task {
1617
padding:10px;
1718
position:relative;

‎src/components/page/toolbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export default class extends React.Component<{
2626
const{callNextPage, showHint, taskPosition, tasks}=this.props;
2727
switch(true){
2828
casetaskPosition>=tasks.length:
29-
return<RaisedButtonlabel='Continue'primary={true}onTouchTap={callNextPage}/>;
29+
return<RaisedButtonlabel='Continue'primary={true}onTouchTap={callNextPage}/>;
3030
default:
31-
return<RaisedButtonlabel='Save'secondary={true}onTouchTap={save}/>;
31+
return<RaisedButtonlabel='Save'secondary={true}onTouchTap={save}/>;
3232
}
3333
}
3434
render(){

‎src/components/progress/progress.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import*asReactfrom'react';
32
import{connect}from'react-redux';
43
import*asActionfrom'../../actions/actions';
@@ -31,7 +30,10 @@ class ProgressPage extends React.Component<{page: CR.Page, itemPosition: CR.Posi
3130
}
3231
}
3332
canActivate(isActive,itemPosition,position){
34-
if(isActive&&itemPosition.chapter<=position.chapter&&itemPosition.page<=position.page){
33+
constearlierChapter=itemPosition.chapter<position.chapter;
34+
constcurrentChapter=itemPosition.chapter=position.chapter;
35+
constearlierOrCurrentPage=itemPosition.page<=position.page;
36+
if(isActive||earlierChapter||(currentChapter&&earlierOrCurrentPage)){
3537
returntrue;
3638
}else{
3739
returnnull;

‎src/services/exists.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ export function fileExists(pathToFile: string): boolean {
55
fs.accessSync(pathToFile,fs.R_OK|fs.W_OK);
66
}catch(e){
77
if(e){
8+
if(e.code!=='ENOENT'){
9+
console.log(e);
10+
}
811
returnfalse;
912
}
1013
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp