Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make service icon rotate #3149

Merged
merged 5 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ declare module 'vue' {
InputField: typeof import('./src/components/form/InputField.vue')['default']
IPhGitlabLogoSimpleFill: typeof import('~icons/ph/gitlab-logo-simple-fill')['default']
ISimpleIconsGitea: typeof import('~icons/simple-icons/gitea')['default']
ISvgSpinners180RingWithBg: typeof import('~icons/svg-spinners/180-ring-with-bg')['default']
ITeenyiconsGitSolid: typeof import('~icons/teenyicons/git-solid')['default']
ITeenyiconsRefreshOutline: typeof import('~icons/teenyicons/refresh-outline')['default']
IVaadinQuestionCircleO: typeof import('~icons/vaadin/question-circle-o')['default']
Expand Down
1 change: 1 addition & 0 deletions web/src/components/repo/pipeline/PipelineStatusIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'text-wp-state-ok-100': pipelineStatusColors[status] === 'green',
'text-wp-state-info-100': pipelineStatusColors[status] === 'blue',
'text-wp-state-warn-100': pipelineStatusColors[status] === 'orange',
'rotate-animation': service && pipelineStatusColors[status] === 'blue',
}"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/repo/pipeline/PipelineStepList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}"
@click="$emit('update:selected-step-id', step.pid)"
>
<PipelineStatusIcon :service="step.type == StepType.Service" :status="step.state" class="!h-4 !w-4" />
<PipelineStatusIcon :service="step.type === StepType.Service" :status="step.state" class="!h-4 !w-4" />
<span class="truncate">{{ step.name }}</span>
<PipelineStepDuration :step="step" />
</button>
Expand Down
10 changes: 5 additions & 5 deletions web/src/lib/api/types/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export type PipelineFeed = Pipeline & {
};

export enum StepType {
Clone = 1,
Service,
Plugin,
Commands,
Cache,
Clone = 'clone',
Service = 'service',
Plugin = 'plugin',
Commands = 'commands',
Cache = 'cache',
}
13 changes: 13 additions & 0 deletions web/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,16 @@ body,
.code-box-inline {
@apply bg-wp-code-200 rounded-md text-wp-code-text-100;
}

/* TODO(2194): https://tailwindcss.com/docs/animation */
@keyframes rotate-kf {
6543 marked this conversation as resolved.
Show resolved Hide resolved
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.rotate-animation {
animation: rotate-kf 2s linear infinite;
}