mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-04 11:29:15 +08:00
fix(windows): fix apm package loading and onboarding styles
This commit is contained in:
parent
5c57817ee6
commit
4b7a3264bd
5 changed files with 45 additions and 1 deletions
|
|
@ -21,7 +21,8 @@ class InstallButton extends React.Component
|
|||
<div className={classname} onClick={@_onInstall}></div>
|
||||
|
||||
_onInstall: =>
|
||||
return false unless @props.package.path
|
||||
return if @state.installing or @state.installed
|
||||
return unless @props.package.path
|
||||
RunningPackageInstalls += 1
|
||||
@setState(installing: true)
|
||||
atom.packages.installPackageFromPath @props.package.path, (err) =>
|
||||
|
|
|
|||
|
|
@ -85,12 +85,14 @@ class TokenAuthPage extends React.Component
|
|||
<input type="text"
|
||||
value={@state.token}
|
||||
onChange={@_onTokenChange}
|
||||
onKeyPress={@_onKeyPress}
|
||||
placeholder="Invitation Code"
|
||||
className="token-input error" />
|
||||
else
|
||||
<input type="text"
|
||||
value={@state.token}
|
||||
onChange={@_onTokenChange}
|
||||
onKeyPress={@_onKeyPress}
|
||||
placeholder="Invitation Code"
|
||||
className="token-input" />
|
||||
|
||||
|
|
@ -113,6 +115,10 @@ class TokenAuthPage extends React.Component
|
|||
_onTokenChange: (event) =>
|
||||
@setState(token: event.target.value)
|
||||
|
||||
_onKeyPress: (event) =>
|
||||
if event.key in ['Enter', 'Return']
|
||||
@_onContinue()
|
||||
|
||||
_onContinue: =>
|
||||
if @state.tokenAuthInflight
|
||||
return
|
||||
|
|
|
|||
|
|
@ -727,4 +727,33 @@ body.platform-win32 {
|
|||
transition: opacity .01s ease-in;
|
||||
}
|
||||
}
|
||||
.initial-package {
|
||||
.btn-install {
|
||||
height: auto;
|
||||
}
|
||||
.btn-install:after {
|
||||
content: "Install";
|
||||
}
|
||||
.btn-install.installing {
|
||||
height: 32px;
|
||||
border: 0;
|
||||
&:hover {
|
||||
background: url('nylas://onboarding/assets/installing-spinner.gif') center no-repeat;
|
||||
background-size: 18px;
|
||||
}
|
||||
}
|
||||
.btn-install.installed {
|
||||
border: 0;
|
||||
height: 32px;
|
||||
&:hover {
|
||||
background: url('nylas://onboarding/assets/green_check@2x.png') center no-repeat;
|
||||
background-size: 27px;
|
||||
}
|
||||
}
|
||||
.btn-install.installed:after,
|
||||
.btn-install.installing:after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ class APMWrapper
|
|||
ATOM_API_URL: 'https://edgehill-packages.nylas.com/api'
|
||||
ATOM_HOME: atom.getConfigDirPath()
|
||||
|
||||
if process.platform is "win32"
|
||||
options.env["ProgramFiles"] = process.env.ProgramFiles
|
||||
|
||||
args.push('--no-color')
|
||||
new BufferedProcess({command, args, stdout, stderr, exit, options})
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,13 @@ body.platform-win32 {
|
|||
input[type="tel"],
|
||||
input[type="time"],
|
||||
input[type="url"] {
|
||||
border: 2px solid @input-border;
|
||||
&.input-bordered {
|
||||
border-radius: 0;
|
||||
}
|
||||
&:focus {
|
||||
box-shadow: 0;
|
||||
border: 2px solid darken(@input-border, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue