Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
Support JQL searching
Browse files Browse the repository at this point in the history
Apply dark mode to login screen
  • Loading branch information
alexcroox committed Jan 16, 2019
1 parent c890d0f commit 782cc56
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jira-timer",
"version": "1.0.25",
"version": "1.0.26",
"description": "Jira Timer",
"productName": "Jira Timer",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/components/external-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ExternalLink extends Component {
}
}

const Link = styled.span`
const Link = styled.a`
text-decoration: underline;
display: inline-block;
Expand Down
5 changes: 3 additions & 2 deletions src/components/worklog.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Worklog extends Component {
<FontAwesomeIcon icon={faSpinner} spin />
</Control>
)}

<WorklogTaskKey>{this.props.task.key}</WorklogTaskKey>
<TaskTitle>{this.props.task.summary}</TaskTitle>

Expand Down Expand Up @@ -57,14 +58,14 @@ Worklog.propTypes = {

const WorklogWrapper = styled.div`
border-top: 1px solid ${props => props.theme.darkMode ? props.theme.dark.tableRow : 'rgba(234,234,234,0.8)' };
background-color: ${props => props.theme.darkMode ? props.theme.dark.tableRow : '#FFF' };
background-color: ${props => props.theme.darkMode ? props.theme.dark.tableRowAlt : '#FFF' };
padding: 10px 12px;
display: flex;
align-items: center;
color: ${props => props.theme.darkMode ? props.theme.dark.color : 'inherit' };
&:nth-child(even) {
background-color: ${props => props.theme.darkMode ? props.theme.dark.tableRowAlt : 'rgba(234,234,234,0.4)' };
background-color: ${props => props.theme.darkMode ? props.theme.dark.tableRow : 'rgba(234,234,234,0.4)' };
}
&:hover {
Expand Down
6 changes: 3 additions & 3 deletions src/containers/footer/footer-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FooterContainer extends Component {
const worklogsPath = this.props.location.pathname === '/worklogs' ? '/dashboard' : '/worklogs'

return (
<FooterStyled>
<FooterWrapper>
<WorklogTotals />

<IconWrap>
Expand All @@ -32,12 +32,12 @@ class FooterContainer extends Component {
<FontAwesomeIcon icon={faCog} />
</IconLink>
</IconWrap>
</FooterStyled>
</FooterWrapper>
)
}
}

const FooterStyled = styled.div`
export const FooterWrapper = styled.div`
background: ${props => props.theme.darkMode ? props.theme.dark.backgroundColor : '#EAEAEA' };
display: flex;
align-items: center;
Expand Down
15 changes: 8 additions & 7 deletions src/containers/login/login-container.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import React, { Component, Fragment } from 'react'
import { shell } from 'electron'
import { connect } from 'react-redux'
import { Redirect } from 'react-router-dom'
import styled from 'styled-components'
import FooterContainer from '../footer/footer-container'
import { FooterWrapper } from '../footer/footer-container'
import FormContainer from '../../components/form-container'
import Header from '../../components/header'
import ExternalLink from '../../components/external-link'
import ErrorMessage from '../../components/error'
import LoginForm from './login-form'
import passwordValidationRule from '../../validation/password-validation'
import { isNotEmpty } from '../../validation/helpers'
import { userLogin } from '../../modules/user'
import Page from '../../components/page'

const validationRules = {
authUrl: [
Expand Down Expand Up @@ -51,7 +52,7 @@ class LoginContainer extends Component {

render () {
return (
<Fragment>
<Page>
{this.props.authToken && (
<Redirect to="/dashboard" />
)}
Expand All @@ -72,10 +73,10 @@ class LoginContainer extends Component {
/>
</FormContainer>

<FooterContainer>
<Credits>created by <ExternalLink>Si digital</ExternalLink></Credits>
</FooterContainer>
</Fragment>
<FooterWrapper>
<Credits>created by Si digital</Credits>
</FooterWrapper>
</Page>
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/containers/search/search-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,14 @@ class SearchContainer extends Component {

const keySearch = query.indexOf("-") > -1
const jqlSearch = query.indexOf('=') > -1 || query.indexOf('~') > 1
let jql

// Is the user searching with custom JQL syntax?
// If not build the JQL for them
if (jqlSearch) {
jql = query
} else {
let jql = `summary ~ "${query}"`
jql = `summary ~ "${query}"`
if (keySearch) jql += `OR key = "${query}"`
jql += 'order by updated DESC'
}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/worklog/worklog-totals.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class WorklogTotals extends Component {

const TimeSummaryContainer = styled.span`
margin-right: 20px;
color: ${props => props.theme.darkMode ? props.theme.dark.inactiveColor : '#666' };
color: ${props => props.theme.darkMode ? props.theme.dark.color : '#666' };
font-size: 12px;
`
const TimeSummary = styled.span`
Expand Down
7 changes: 0 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ import AppContainer from 'containers/app/app-container'

const log = remote.require('electron-log')

const originalConsoleLog = console.log.bind(console)
console.log = (...args) => {
log.info(args)
originalConsoleLog(...args)
}

window.onerror = (err) => {
log.error(err)
originalConsoleLog(...err)
}

render(
Expand Down

0 comments on commit 782cc56

Please sign in to comment.