-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from atlassian/ARC-2594-update-config-top-panel
Arc-2594 update config top panel
- Loading branch information
Showing
7 changed files
with
279 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
app/jenkins-for-jira-ui/src/api/fetchFeatureFlagFromBackend.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { invoke } from '@forge/bridge'; | ||
|
||
export const fetchFeatureFlagFromBackend = async (featureFlag: string): Promise<boolean> => { | ||
return invoke('fetchFeatureFlagFromBackend', { featureFlag }); | ||
const featureFlagStatus: boolean = await invoke('fetchFeatureFlagFromBackend', { featureFlag }); | ||
return featureFlagStatus; | ||
}; |
41 changes: 41 additions & 0 deletions
41
app/jenkins-for-jira-ui/src/components/MainPage/MainPage.styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { css } from '@emotion/css'; | ||
|
||
export const mainPageContainer = css` | ||
margin: 0 auto; | ||
max-width: 936px; | ||
`; | ||
|
||
// Top panel | ||
export const topPanelContainer = css` | ||
align-items: center; | ||
border-radius: 8px; | ||
box-shadow: 0px 2px 4px 0px #091E4240; | ||
display: flex; | ||
max-height: 164px; | ||
padding: 1.5em; | ||
margin: 2em auto 2em 0.1em; | ||
`; | ||
|
||
export const topPanelContentHeaderContainer = css` | ||
flex-direction: column; | ||
`; | ||
|
||
export const topPanelContentHeader = css` | ||
font-size: 20px; | ||
line-height: 24px; | ||
`; | ||
|
||
export const topPanelContent = css` | ||
font-size: 14px; | ||
line-height: 20px; | ||
margin: 1em auto 1em 0; | ||
`; | ||
|
||
export const topPanelImgContainer = css` | ||
text-align: right; | ||
width: 42%; | ||
`; | ||
|
||
export const topPanelImg = css` | ||
width: 75%; | ||
`; |
32 changes: 32 additions & 0 deletions
32
app/jenkins-for-jira-ui/src/components/MainPage/MainPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import PageHeader from '@atlaskit/page-header'; | ||
import { ButtonGroup } from '@atlaskit/button'; | ||
import Button from '@atlaskit/button/standard-button'; | ||
import { headerContainer } from '../JenkinsServerList/JenkinsServerList.styles'; | ||
import { TopPanel } from './TopPanel/TopPanel'; | ||
import { mainPageContainer } from './MainPage.styles'; | ||
|
||
const MainPage = (): JSX.Element => { | ||
const pageHeaderActions = ( | ||
<ButtonGroup> | ||
{/* TODO - add onClick event */} | ||
<Button appearance="primary"> | ||
Connect a new Jenkins server | ||
</Button> | ||
{/* TODO - add onClick event */} | ||
<Button>Share page</Button> | ||
</ButtonGroup> | ||
); | ||
|
||
return ( | ||
<div className={mainPageContainer}> | ||
<div className={headerContainer}> | ||
<PageHeader actions={pageHeaderActions}>Jenkins for Jira</PageHeader> | ||
</div> | ||
|
||
<TopPanel /> | ||
</div> | ||
); | ||
}; | ||
|
||
export { MainPage }; |
29 changes: 29 additions & 0 deletions
29
app/jenkins-for-jira-ui/src/components/MainPage/TopPanel/TopPanel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { cx } from '@emotion/css'; | ||
import { | ||
topPanelContainer, | ||
topPanelContent, | ||
topPanelContentHeader, | ||
topPanelContentHeaderContainer, | ||
topPanelImgContainer, | ||
topPanelImg | ||
} from '../MainPage.styles'; | ||
import { PluginIcon } from '../../icons/PluginIcon'; | ||
|
||
const TopPanel = (): JSX.Element => { | ||
return ( | ||
<div className={cx(topPanelContainer)}> | ||
<div className={cx(topPanelContentHeaderContainer)}> | ||
<h2 className={cx(topPanelContentHeader)}>Server management</h2> | ||
<p className={cx(topPanelContent)}>Jenkins for Jira lets your teams <u>keep track of code | ||
they build and deploy</u> on Jenkins servers.</p> | ||
{/* TODO - add link */} | ||
<p className={cx(topPanelContent)}>Follow the <strong>set up guide</strong> for each server to | ||
receive build and deployment data.</p> | ||
</div> | ||
<PluginIcon containerClassName={topPanelImgContainer} svgClassName={topPanelImg}/> | ||
</div> | ||
); | ||
}; | ||
|
||
export { TopPanel }; |
Oops, something went wrong.