mirror of
https://github.com/harness/drone.git
synced 2025-05-21 11:29:52 +08:00
fix: [code-886]: fix execution runnning icon (#560)
This commit is contained in:
parent
6d5a073213
commit
b7a7e7aff5
@ -4,6 +4,17 @@ html[class=''] {
|
||||
}
|
||||
}
|
||||
|
||||
.branchContainer {
|
||||
:global(> .bp3-button-text) {
|
||||
display: flex !important;
|
||||
> .branchSpan {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
padding-right: var(--spacing-tiny);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
--border: 1px solid var(--grey-200) !important;
|
||||
--background-color-active: var(--white) !important;
|
||||
@ -19,6 +30,7 @@ html[class=''] {
|
||||
.prefix {
|
||||
color: var(--grey-450) !important;
|
||||
font-weight: normal;
|
||||
padding-right: var(--spacing-xsmall);
|
||||
}
|
||||
|
||||
:global {
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* eslint-disable */
|
||||
// This is an auto-generated file
|
||||
export declare const branchContainer: string
|
||||
export declare const branchesOnly: string
|
||||
export declare const branchSpan: string
|
||||
export declare const button: string
|
||||
export declare const input: string
|
||||
export declare const listContainer: string
|
||||
|
@ -9,6 +9,7 @@ import { noop } from 'lodash-es'
|
||||
import { String, useStrings } from 'framework/strings'
|
||||
import { getErrorMessage, LIST_FETCHING_LIMIT } from 'utils/Utils'
|
||||
import { useAppContext } from 'AppContext'
|
||||
import Branches from '../../icons/Branches.svg'
|
||||
import { CodeIcon, GitInfoProps, GitRefType, isRefATag, REFS_TAGS_PREFIX } from 'utils/GitUtils'
|
||||
import css from './BranchTagSelect.module.scss'
|
||||
|
||||
@ -44,22 +45,35 @@ export const BranchTagSelect: React.FC<BranchTagSelectProps> = ({
|
||||
|
||||
return (
|
||||
<Button
|
||||
className={cx(css.button, className)}
|
||||
className={cx(css.button, className, gitRefType == GitRefType.BRANCH ? css.branchContainer : null)}
|
||||
text={
|
||||
text ? (
|
||||
labelPrefix ? (
|
||||
<>
|
||||
{gitRefType == GitRefType.BRANCH ? (
|
||||
<span className={css.branchSpan}>
|
||||
<img src={Branches} width={14} height={14} />
|
||||
</span>
|
||||
) : null}
|
||||
|
||||
<span className={css.prefix}>{labelPrefix}</span>
|
||||
{text}
|
||||
</>
|
||||
) : (
|
||||
text
|
||||
<>
|
||||
{gitRefType == GitRefType.BRANCH ? (
|
||||
<span className={css.branchSpan}>
|
||||
<img src={Branches} width={14} height={14} />
|
||||
</span>
|
||||
) : null}
|
||||
{text}
|
||||
</>
|
||||
)
|
||||
) : (
|
||||
<span className={css.prefix}>{placeHolder}</span>
|
||||
)
|
||||
}
|
||||
icon={gitRefType == GitRefType.BRANCH ? CodeIcon.Branch : CodeIcon.Tag}
|
||||
icon={gitRefType == GitRefType.BRANCH ? undefined : CodeIcon.Tag}
|
||||
rightIcon="chevron-down"
|
||||
variation={ButtonVariation.TERTIARY}
|
||||
iconProps={{ size: 14 }}
|
||||
@ -256,15 +270,19 @@ function GitRefList({
|
||||
)) || (
|
||||
<Button
|
||||
text={
|
||||
<String
|
||||
stringID={activeGitRefType === GitRefType.BRANCH ? 'createBranchFromBranch' : 'createBranchFromTag'}
|
||||
tagName="span"
|
||||
className={css.newBtnText}
|
||||
vars={{ newBranch: query, target: gitRef }}
|
||||
useRichText
|
||||
/>
|
||||
<>
|
||||
<img src={Branches} width={20} height={20}></img>
|
||||
<String
|
||||
stringID={
|
||||
activeGitRefType === GitRefType.BRANCH ? 'createBranchFromBranch' : 'createBranchFromTag'
|
||||
}
|
||||
tagName="span"
|
||||
className={css.newBtnText}
|
||||
vars={{ newBranch: query, target: gitRef }}
|
||||
useRichText
|
||||
/>
|
||||
</>
|
||||
}
|
||||
icon={CodeIcon.Branch}
|
||||
variation={ButtonVariation.SECONDARY}
|
||||
onClick={() => onCreateBranch()}
|
||||
className={Classes.POPOVER_DISMISS}
|
||||
|
@ -39,6 +39,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
&.executionWaiting {
|
||||
svg {
|
||||
> circle {
|
||||
fill: #b0b1c3 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.pending {
|
||||
--fgColor: var(--grey-600);
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* eslint-disable */
|
||||
// This is an auto-generated file
|
||||
export declare const error: string
|
||||
export declare const executionWaiting: string
|
||||
export declare const failure: string
|
||||
export declare const iconOnly: string
|
||||
export declare const main: string
|
||||
|
@ -22,6 +22,7 @@ interface ExecutionStatusProps {
|
||||
iconSize?: number
|
||||
className?: string
|
||||
isCi?: boolean
|
||||
inExecution?: boolean
|
||||
}
|
||||
|
||||
export const ExecutionStatus: React.FC<ExecutionStatusProps> = ({
|
||||
@ -30,14 +31,15 @@ export const ExecutionStatus: React.FC<ExecutionStatusProps> = ({
|
||||
iconOnly = false,
|
||||
noBackground = false,
|
||||
className,
|
||||
isCi = false
|
||||
isCi = false,
|
||||
inExecution = false
|
||||
}) => {
|
||||
const { getString } = useStrings()
|
||||
const maps = useMemo(
|
||||
() => ({
|
||||
[ExecutionState.PENDING]: {
|
||||
icon: isCi ? 'execution-waiting' : 'ci-pending-build',
|
||||
css: isCi ? css.waiting : css.pending,
|
||||
icon: isCi ? (inExecution ? 'execution-waiting' : 'running-filled') : 'ci-pending-build',
|
||||
css: isCi ? (inExecution ? css.waiting : css.executionWaiting) : css.pending,
|
||||
title: getString('pending').toLocaleUpperCase()
|
||||
},
|
||||
[ExecutionState.RUNNING]: {
|
||||
|
@ -31,8 +31,8 @@ const ImportSpaceForm = (props: ImportFormProps) => {
|
||||
organization: ''
|
||||
}
|
||||
const providers = [
|
||||
{ value: 'Github', label: 'Github' },
|
||||
{ value: 'Gitlab', label: 'Gitlab' }
|
||||
{ value: 'GitHub', label: 'GitHub' },
|
||||
{ value: 'GitLab', label: 'GitLab' }
|
||||
]
|
||||
const validationSchemaStepOne = yup.object().shape({
|
||||
gitProvider: yup.string().trim().required(getString('importSpace.providerRequired'))
|
||||
|
@ -70,7 +70,7 @@ tagDescription: Enter tag description here
|
||||
findBranch: Find a branch
|
||||
searchBranches: Search branches
|
||||
updated: Updated
|
||||
cloneHTTPS: Clone with HTTPS
|
||||
cloneHTTPS: Git clone URL
|
||||
nameYourFile: Name your file...
|
||||
noResultTitle: Sorry, no result found
|
||||
noResultMessage: What you searched was unfortunately not found or doesn’t exist
|
||||
@ -469,7 +469,7 @@ cloneText: Your clone credentials have been generated. Please make sure to copy
|
||||
manageApiToken: Manage API Token
|
||||
userName: User Name
|
||||
passwordApi: Password (API Token)
|
||||
firstTimeTitle: Please generate Git Credentials if it’s your first time to clone the repository
|
||||
firstTimeTitle: Please generate Git Credentials if it’s your first time cloning the repository
|
||||
manageCredText: You can also manage your git credential {URL}
|
||||
blame: Blame
|
||||
blameEmpty: File is empty. No blame information available.
|
||||
@ -590,7 +590,7 @@ addMember: Add Member
|
||||
addUserToSpace1: Add user to this Project
|
||||
addUserToSpace2: Add {{user}} to this Project
|
||||
spaceMemberships:
|
||||
addMember: Add a member for {{name}}
|
||||
addMember: Add a member to {{name}}
|
||||
changeRole: Change Role
|
||||
removeMember: Remove Member
|
||||
removeMembershipMsg: Are you sure you want to remove this member?
|
||||
@ -776,19 +776,17 @@ exportSpace:
|
||||
projectName: Project Name
|
||||
entitiesLabel: Entities to upgrade
|
||||
projectOrg: Project Organization
|
||||
repoToConvert: '{{length}} repositories to be converted'
|
||||
repoToConvert: '{{length}} repositories to be upgraded'
|
||||
startUpgrade: Start Upgrade
|
||||
upgradeHarness: Upgrade to Harness
|
||||
newProject: New Project Details
|
||||
upgradeConfirmation: Upgrade Confirmation
|
||||
upgradeTitle: Upgrade this project to the Harness Software Delivery platform
|
||||
upgrade: Upgrade
|
||||
upgradeContent: Upgrade this project to Harness. By upgrading to Harness, you will create a new project in your
|
||||
Harness account and migrate all repositories, pipelines and users / memberships to the new
|
||||
project. Learn more about Harness.
|
||||
upgradeContent: Upgrade this project to Harness. By upgrading to Harness, you will create a new project in your Harness account and migrate all repositories to the new project. Learn more about Harness.
|
||||
upgradeProgress: 'Upgrading in progress'
|
||||
exportCompleted: Export Completed
|
||||
exportRepoCompleted: Exported {{repoCount}} repositories
|
||||
exportCompleted: Upgrade Completed
|
||||
exportRepoCompleted: Upgraded {{repoCount}} repositories
|
||||
exportRepo: Exporting {{repoCount}} repositories
|
||||
spaceUpdate: Project Updated
|
||||
generate: Generate
|
||||
|
1
web/src/icons/Branches.svg
Normal file
1
web/src/icons/Branches.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.628 2.42c0-.41.338-.742.754-.742s.753.332.753.741c0 .41-.337.741-.753.741a.747.747 0 0 1-.754-.74ZM3.382.937c-.832 0-1.507.663-1.507 1.481 0 .69.48 1.27 1.13 1.435v4.292c-.65.164-1.13.744-1.13 1.435 0 .818.675 1.482 1.507 1.482.832 0 1.506-.664 1.506-1.482 0-.69-.48-1.27-1.13-1.435v-1.45h.001c0-.41.337-.741.753-.741h2.976c.832 0 1.506-.664 1.506-1.482v-.618a1.487 1.487 0 0 0 1.131-1.436c0-.818-.675-1.482-1.507-1.482-.832 0-1.506.664-1.506 1.482 0 .69.48 1.27 1.13 1.435v.62c0 .408-.338.74-.754.74H4.512c-.274 0-.532.072-.754.199V3.854a1.487 1.487 0 0 0 1.13-1.435c0-.818-.674-1.482-1.506-1.482Zm5.236.74a.747.747 0 0 0-.753.741c0 .41.337.741.753.741a.747.747 0 0 0 .754-.74c0-.41-.338-.742-.754-.742Zm-5.99 7.903c0-.41.338-.741.754-.741s.753.332.753.74c0 .41-.337.742-.753.742a.747.747 0 0 1-.754-.741Z" fill="#4F5162"/></svg>
|
After Width: | Height: | Size: 954 B |
@ -129,6 +129,7 @@ const PipelineList = () => {
|
||||
iconSize={24}
|
||||
className={css.statusIcon}
|
||||
isCi
|
||||
inExecution
|
||||
/>
|
||||
<Text className={css.repoName}>
|
||||
<Keywords value={searchTerm}>{record.uid}</Keywords>
|
||||
|
Loading…
Reference in New Issue
Block a user