   getInitialState: ->
     style: 'default'
   tick: (timeRemaining) ->
-    style = 'default'
-    if timeRemaining > 600
-      style = if @props.isLSC then 'danger' else 'primary'
-    else if timeRemaining > 0
-      style = 'warning'
-    else if timeRemaining is 0
-      style = 'success'
+    style = switch
+      when timeRemaining > 600 and @props.isLSC then 'danger'
+      when timeRemaining > 600 then 'primary'
+      when timeRemaining >  0  then 'warning'
+      when timeRemaining is 0  then 'success'
+      else 'default'
     @setState {style: style} if style isnt @state.style
   render: ->
-    <Label bsStyle={@state.style}>
+    <Label className="kdock-timer" bsStyle={@state.style}>
     {
       if @props.completeTime >= 0
         <CountdownTimer countdownId={"kdock-#{@props.dockIndex}"}

        isLSC = isInUse and @state.docks[i].material[0] >= 1000
        content = <div className="panel-item kdock-item">
                    <span className="kdock-name">{dockName}</span>
                    <CountdownLabel key={i}
                                    dockIndex={i}
                                    completeTime={@state.docks[i].completeTime}
                                    isLSC={isLSC}
                                    notify={@notify} />

    window.addEventListener 'game.response', @handleResponse
  componentWillUnmount: ->
    window.removeEventListener 'game.response', @handleResponse
  getMaterialImage: (idx) ->
    path = join(ROOT, 'assets', 'img', 'material', "0#{idx}.png")
    <img src={path} className="material-icon" />
  constructionIcon: join(ROOT, 'assets', 'img', 'operation', 'build.png')
  notify: ->
    return if not @canNotify
    completedShips = @state.docks.slice(1).filter(
      (dock) -> 0 <= dock.completeTime < new Date().getTime() + 1000).map(
      (dock) -> i18n.resources.__ dock.name).join(', ')
    notify "#{completedShips} #{__ 'built'}",
      type: __ "Construction"
      icon: @constructionIcon
  render: ->
    <div>
    {
