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