1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Windowsに合わせてUI修正(Font/Username/Key input:Command key -> Control key)

This commit is contained in:
Dick Choi
2015-11-17 09:01:25 +09:00
parent 76a031a8c9
commit 1318abd37e
4 changed files with 16 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ class HomePage extends React.Component {
}
// Search inputがfocusされていたら大体のキー入力は無視される。
if (top.isInputFocused() && !e.metaKey) {
if (top.isInputFocused() && !(e.metaKey || e.ctrlKey)) {
if (e.keyCode === 13 || e.keyCode === 27) top.escape()
return
}
@@ -54,7 +54,7 @@ class HomePage extends React.Component {
if (e.keyCode === 27) {
detail.handleCancelButtonClick()
}
if ((e.keyCode === 13 && e.metaKey) || (e.keyCode === 83 && e.metaKey)) {
if ((e.keyCode === 13 && (e.metaKey || e.ctrlKey)) || (e.keyCode === 83 && (e.metaKey || e.ctrlKey))) {
detail.handleSaveButtonClick()
}
break
@@ -72,14 +72,14 @@ class HomePage extends React.Component {
if (e.keyCode === 27) {
detail.handleDeleteCancelButtonClick()
}
if (e.keyCode === 13 && e.metaKey) {
if (e.keyCode === 13 && (e.metaKey || e.ctrlKey)) {
detail.handleDeleteConfirmButtonClick()
}
break
}
// `detail`の`openDeleteConfirmMenu`が`true`なら呼ばれない。
if (e.keyCode === 27 || (e.keyCode === 70 && e.metaKey)) {
if (e.keyCode === 27 || (e.keyCode === 70 && (e.metaKey || e.ctrlKey))) {
top.focusInput()
}
@@ -91,7 +91,7 @@ class HomePage extends React.Component {
list.selectNextArticle()
}
if (e.keyCode === 65 || e.keyCode === 13 && e.metaKey) {
if (e.keyCode === 65 || e.keyCode === 13 && (e.metaKey || e.ctrlKey)) {
nav.handleNewPostButtonClick()
e.preventDefault()
}

View File

@@ -7,7 +7,10 @@ import Preferences from 'boost/components/modal/Preferences'
import CreateNewFolder from 'boost/components/modal/CreateNewFolder'
import remote from 'remote'
let userName = remote.getGlobal('process').env.USER
let mainEnv = remote.getGlobal('process').env
let userName = mainEnv.USER != null
? mainEnv.USER
: mainEnv.USERNAME
const BRAND_COLOR = '#18AF90'

View File

@@ -7,8 +7,10 @@ global-reset()
iptBgColor = #E6E6E6
iptFocusBorderColor = #369DCD
DEFAULT_FONTS = 'Lato', 'MS Gothic', 'Malgun Gothic', 'Sans-serif'
body
font-family "Lato"
font-family DEFAULT_FONTS
color textColor
font-size fontSize
width 100%

View File

@@ -7,6 +7,8 @@ global-reset()
@import './containers/*'
@import './HomeContainer'
DEFAULT_FONTS = 'Lato', 'MS Gothic', 'Malgun Gothic', 'Sans-serif'
*
-webkit-app-region no-drag
-webkit-user-select none
@@ -17,13 +19,13 @@ html, body
overflow hidden
body
font-family "Lato"
font-family DEFAULT_FONTS
color textColor
font-size fontSize
font-weight 400
button, input, select
font-family "Lato"
font-family DEFAULT_FONTS
div, span, a, button, input, textarea
box-sizing border-box