Skip to content

Commit 04060ce

Browse files
committed
BoostIO#14 改善適用
�- アプリが立ち上がったら最初はmy planetが表示されるようにしたい - Noteがスクロールできない - Note行間がなくて読みづらい
1 parent da066fe commit 04060ce

7 files changed

Lines changed: 36 additions & 31 deletions

File tree

browser/main/Components/CodeEditor.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = React.createClass({
66
propTypes: {
77
code: React.PropTypes.string,
88
mode: React.PropTypes.string,
9+
className: React.PropTypes.string,
910
onChange: React.PropTypes.func
1011
},
1112
componentDidMount: function () {
@@ -52,7 +53,7 @@ module.exports = React.createClass({
5253
},
5354
render: function () {
5455
return (
55-
<div ref='target'></div>
56+
<div ref='target' className={this.props.className}></div>
5657
)
5758
}
5859
})

browser/main/Components/CodeViewer.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ var ace = window.ace
55
module.exports = React.createClass({
66
propTypes: {
77
code: React.PropTypes.string,
8-
mode: React.PropTypes.string
8+
mode: React.PropTypes.string,
9+
className: React.PropTypes.string
910
},
1011
componentDidMount: function () {
1112
var el = React.findDOMNode(this.refs.target)
@@ -46,7 +47,7 @@ module.exports = React.createClass({
4647
},
4748
render: function () {
4849
return (
49-
<div ref='target'></div>
50+
<div ref='target' className={this.props.className}></div>
5051
)
5152
}
5253
})

browser/main/Components/PlanetArticleDetail.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ module.exports = React.createClass({
8181
</span>
8282
</div>
8383
<div className='detailBody'>
84-
<div className='content'>
85-
<CodeViewer code={article.content} mode={article.mode}/>
86-
</div>
84+
<CodeViewer className='content' code={article.content} mode={article.mode}/>
8785
</div>
8886
</div>
8987
)

browser/main/Containers/HomeContainer.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ module.exports = React.createClass({
1616
componentDidMount: function () {
1717
if (this.isActive('homeEmpty')) {
1818
var user = JSON.parse(localStorage.getItem('currentUser'))
19+
if (user.Planets != null && user.Planets.length > 0) {
20+
this.transitionTo('planet', {userName: user.name, planetName: user.Planets[0].name})
21+
return
22+
}
1923
this.transitionTo('userHome', {userName: user.name})
2024
}
2125
},

browser/main/Mixins/KeyCaster.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ var KeyStore = Reflux.createStore({
2020
if (typeof cb === 'function') cb()
2121
},
2222
onKeyDown: function (e) {
23-
console.log(e.keyCode)
24-
console.log(state)
25-
2623
/*
2724
Modals
2825
*/
29-
3026
if (state.codeForm || state.noteForm || state.noteDeleteModal || state.codeDeleteModal || state.addMemberModal || state.aboutModal || state.editProfileModal || state.contactModal || state.teamCreateModal || state.planetCreateModal || state.planetSettingModal || state.teamSettingsModal || state.logoutModal) {
3127
// ESC
3228
if (e.keyCode === 27) this.cast('closeModal')

browser/styles/main/containers/PlanetContainer.styl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,19 +287,20 @@ articleListWidth= 275px
287287
absolute left right bottom
288288
top 105px
289289
.content
290+
position absolute
291+
top 5px
292+
bottom 5px
293+
left 2px
294+
right 2px
290295
box-sizing border-box
291296
padding 5px
292297
border-top solid 1px borderColor
293-
overflow-x hidden
294-
overflow-y auto
295298
&.noteDetail
296299
.detailBody .content
300+
overflow-x hidden
301+
overflow-y auto
297302
marked()
298303
&.codeDetail
299304
.detailBody .content
300305
.ace_editor
301-
position absolute
302-
top 5px
303-
bottom 5px
304-
left 2px
305-
right 2px
306+
absolute left right top bottom

browser/styles/mixins/marked.styl

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ marked()
2222
font-size 0.67em
2323
margin 2.33em auto
2424
h1, h2, h3, h4, h5, h6
25-
font-weight font-weight 400
26-
line-height 1.2em
25+
font-weight 400
26+
line-height 1.4em
2727
p
28-
line-height 1.2em
28+
line-height 1.4em
29+
margin-bottom 15px
2930
img
3031
max-width 100%
3132
strong
@@ -36,14 +37,14 @@ marked()
3637
text-decoration line-through
3738
blockquote
3839
border-left solid 4px brandBorderColor
39-
margin 1em 0
40+
margin 15px 0 15px
4041
padding 0 25px
4142
ul
4243
list-style-type disc
4344
padding-left 35px
4445
li
4546
display list-item
46-
margin 0.5em 0
47+
margin 15px 0
4748
&>li>ul
4849
list-style-type circle
4950
&>li>ul
@@ -53,33 +54,36 @@ marked()
5354
padding-left 35px
5455
li
5556
display list-item
56-
margin 0.5em 0
57+
margin 15px 0
5758
code
5859
font-family monospace
5960
padding 2px 4px
6061
border solid 1px borderColor
6162
border-radius 4px
6263
font-size 0.9em
64+
color black
65+
text-decoration none
6366
pre
6467
padding 5px
6568
border solid 1px borderColor
6669
border-radius 5px
67-
margin-bottom 0.5em
6870
overflow-x auto
71+
margin-bottom 15px
6972
&>code
7073
padding 0
7174
border none
7275
border-radius 0
76+
color black
7377
table
7478
width 100%
75-
margin 15px 0
79+
margin 15px 0 25px
7680
thead
7781
tr
7882
background-color tableHeadBgColor
7983
th
80-
border-style: solid;
81-
padding: 5px;
82-
border-width: 1px 0 2px 1px;
84+
border-style solid
85+
padding 15px 5px
86+
border-width 1px 0 2px 1px
8387
border-color borderColor
8488
&:last-child
8589
border-right solid 1px borderColor
@@ -89,9 +93,9 @@ marked()
8993
tr:nth-child(2n)
9094
background-color tableEvenBgColor
9195
td
92-
border-style: solid;
93-
padding: 5px;
94-
border-width: 0 0 1px 1px;
96+
border-style solid
97+
padding 15px 5px
98+
border-width 0 0 1px 1px
9599
border-color borderColor
96100
&:last-child
97101
border-right solid 1px borderColor

0 commit comments

Comments
 (0)