mirror of
https://github.com/harness/drone.git
synced 2025-05-31 11:43:15 +00:00
fix: [code-574]: active stale filter not working (#173)
This commit is contained in:
parent
dda81f3035
commit
d6c7f41dd4
@ -4,13 +4,10 @@ import {
|
|||||||
Container,
|
Container,
|
||||||
Layout,
|
Layout,
|
||||||
Text,
|
Text,
|
||||||
Button,
|
|
||||||
FontVariation,
|
FontVariation,
|
||||||
ButtonVariation,
|
|
||||||
Icon,
|
Icon,
|
||||||
Avatar,
|
Avatar,
|
||||||
FlexExpander,
|
FlexExpander,
|
||||||
ButtonSize,
|
|
||||||
Color,
|
Color,
|
||||||
IconName,
|
IconName,
|
||||||
useToaster
|
useToaster
|
||||||
@ -35,7 +32,7 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
|
|||||||
// const [searchTerm, setSearchTerm] = useState('')
|
// const [searchTerm, setSearchTerm] = useState('')
|
||||||
// const [page] = usePageIndex(1)
|
// const [page] = usePageIndex(1)
|
||||||
const { getString } = useStrings()
|
const { getString } = useStrings()
|
||||||
const tagArr = []
|
// const tagArr = []
|
||||||
const { showError } = useToaster()
|
const { showError } = useToaster()
|
||||||
|
|
||||||
const generateReviewDecisionIcon = (
|
const generateReviewDecisionIcon = (
|
||||||
@ -198,15 +195,15 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
|
|||||||
width="100px"
|
width="100px"
|
||||||
height="24px"
|
height="24px"
|
||||||
items={[
|
items={[
|
||||||
{
|
// {
|
||||||
text: getString('makeOptional'),
|
// text: getString('makeOptional'),
|
||||||
onClick: noop
|
// onClick: noop
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
text: getString('makeRequired'),
|
// text: getString('makeRequired'),
|
||||||
onClick: noop
|
// onClick: noop
|
||||||
},
|
// },
|
||||||
'-',
|
// '-',
|
||||||
{
|
{
|
||||||
isDanger: true,
|
isDanger: true,
|
||||||
text: getString('remove'),
|
text: getString('remove'),
|
||||||
@ -284,7 +281,7 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
|
|||||||
</Text>
|
</Text>
|
||||||
)} */}
|
)} */}
|
||||||
</Container>
|
</Container>
|
||||||
<Layout.Horizontal>
|
{/* <Layout.Horizontal>
|
||||||
<Text style={{ lineHeight: '24px' }} font={{ variation: FontVariation.H6 }}>
|
<Text style={{ lineHeight: '24px' }} font={{ variation: FontVariation.H6 }}>
|
||||||
{getString('tags')}
|
{getString('tags')}
|
||||||
</Text>
|
</Text>
|
||||||
@ -299,7 +296,7 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
|
|||||||
padding={{ top: 'large', bottom: 'large' }}>
|
padding={{ top: 'large', bottom: 'large' }}>
|
||||||
{getString('noneYet')}
|
{getString('noneYet')}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)} */}
|
||||||
</Layout.Vertical>
|
</Layout.Vertical>
|
||||||
</Container>
|
</Container>
|
||||||
</Container>
|
</Container>
|
||||||
|
@ -15,30 +15,30 @@ interface BranchesContentHeaderProps extends Pick<GitInfoProps, 'repoMetadata'>
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function BranchesContentHeader({
|
export function BranchesContentHeader({
|
||||||
onBranchTypeSwitched,
|
// onBranchTypeSwitched,
|
||||||
onSearchTermChanged,
|
onSearchTermChanged,
|
||||||
activeBranchType = GitBranchType.ALL,
|
// activeBranchType = GitBranchType.ALL,
|
||||||
repoMetadata,
|
repoMetadata,
|
||||||
onNewBranchCreated,
|
onNewBranchCreated,
|
||||||
loading
|
loading
|
||||||
}: BranchesContentHeaderProps) {
|
}: BranchesContentHeaderProps) {
|
||||||
const { getString } = useStrings()
|
const { getString } = useStrings()
|
||||||
const [branchType, setBranchType] = useState(activeBranchType)
|
// const [branchType, setBranchType] = useState(activeBranchType)
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
const items = useMemo(
|
// const items = useMemo(
|
||||||
() => [
|
// () => [
|
||||||
{ label: getString('activeBranches'), value: GitBranchType.ACTIVE },
|
// { label: getString('activeBranches'), value: GitBranchType.ACTIVE },
|
||||||
{ label: getString('inactiveBranches'), value: GitBranchType.INACTIVE },
|
// { label: getString('inactiveBranches'), value: GitBranchType.INACTIVE },
|
||||||
// { label: getString('yourBranches'), value: GitBranchType.YOURS },
|
// // { label: getString('yourBranches'), value: GitBranchType.YOURS },
|
||||||
{ label: getString('allBranches'), value: GitBranchType.ALL }
|
// { label: getString('allBranches'), value: GitBranchType.ALL }
|
||||||
],
|
// ],
|
||||||
[getString]
|
// [getString]
|
||||||
)
|
// )
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container className={css.main}>
|
<Container className={css.main}>
|
||||||
<Layout.Horizontal spacing="medium">
|
<Layout.Horizontal spacing="medium">
|
||||||
<DropDown
|
{/* <DropDown
|
||||||
value={branchType}
|
value={branchType}
|
||||||
items={items}
|
items={items}
|
||||||
onChange={({ value }) => {
|
onChange={({ value }) => {
|
||||||
@ -46,7 +46,7 @@ export function BranchesContentHeader({
|
|||||||
onBranchTypeSwitched(value as GitBranchType)
|
onBranchTypeSwitched(value as GitBranchType)
|
||||||
}}
|
}}
|
||||||
popoverClassName={css.branchDropdown}
|
popoverClassName={css.branchDropdown}
|
||||||
/>
|
/> */}
|
||||||
<FlexExpander />
|
<FlexExpander />
|
||||||
<SearchInputWithSpinner
|
<SearchInputWithSpinner
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user