1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00
- add error alert(folder editing)
- debug clear button of search input
This commit is contained in:
Rokt33r
2015-11-05 09:50:07 +09:00
parent cc0f2c7c7f
commit 8abdedc11d
10 changed files with 126 additions and 77 deletions

View File

@@ -27,8 +27,8 @@ class HomePage extends React.Component {
}
handleKeyDown (e) {
if (isModalOpen() && e.keyCode === 27) {
closeModal()
if (isModalOpen()) {
if (e.keyCode === 27) closeModal()
return
}

View File

@@ -61,9 +61,7 @@ export default class ArticleTopBar extends React.Component {
}
handleSearchClearButton (e) {
let { dispatch } = this.props
dispatch(setSearchFilter(''))
this.searchInput.value = ''
this.focusInput()
}

View File

@@ -7,9 +7,9 @@ import HomePage from './HomePage'
// import auth from 'boost/auth'
import store from 'boost/store'
import ReactDOM from 'react-dom'
import { isModalOpen, closeModal } from 'boost/modal'
import { IDLE_MODE, CREATE_MODE, EDIT_MODE } from 'boost/actions'
require('../styles/main/index.styl')
import { openModal } from 'boost/modal'
import Tutorial from 'boost/components/modal/Tutorial'
let routes = (
<Route path='/' component={MainPage}>
@@ -27,4 +27,11 @@ ReactDOM.render((
), el, function () {
let loadingCover = document.getElementById('loadingCover')
loadingCover.parentNode.removeChild(loadingCover)
let status = JSON.parse(localStorage.getItem('status'))
if (status == null) status = {}
if (!status.introWatched) {
openModal(Tutorial)
status.introWatched = true
localStorage.setItem('status', JSON.stringify(status))
}
})

View File

@@ -37,22 +37,17 @@ iptFocusBorderColor = #369DCD
margin 100px auto 25px
&:focus
border-color iptFocusBorderColor
.public
.alert
color infoTextColor
background-color infoBackgroundColor
font-size 14px
padding 15px 15px
width 330px
border-radius 5px
margin 0 auto
text-align center
button
border none
background-color transparent
font-size 18px
color inactiveTextColor
transition 0.1s
button:hover
font-size 22px
button.active
color brandColor
font-size 22px
.divider
margin 0 5px
&.error
color errorTextColor
background-color errorBackgroundColor
.confirmBtn
display block
position absolute

View File

@@ -103,23 +103,17 @@ iptFocusBorderColor = #369DCD
font-size 14px
&:hover
background-color lighten(brandColor, 10%)
.alert
float right
height 33px
padding 0 15px
border-radius 5px
margin-right 5px
line-height 33px
font-size 14px
&.info
background-color infoBackgroundColor
color infoTextColor
&.error
background-color errorBackgroundColor
color errorTextColor
&.success
background-color successBackgroundColor
color successTextColor
.alert
color infoTextColor
background-color infoBackgroundColor
font-size 14px
padding 15px 15px
width 330px
border-radius 5px
margin 10px auto
&.error
color errorTextColor
background-color errorBackgroundColor
&.AppSettingTab
.description
marked()
@@ -390,6 +384,18 @@ iptFocusBorderColor = #369DCD
width 145px
text-align center
&.newFolder
.alert
display block
color infoTextColor
background-color infoBackgroundColor
font-size 14px
padding 15px 15px
width 330px
border-radius 5px
margin 0 auto
&.error
color errorTextColor
background-color errorBackgroundColor
.folderName input
height 33px
border 1px solid transparent