Skip to content

Commit

Permalink
match WorkflowNavigationTitle styling with ToolCard header
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Dec 3, 2024
1 parent 1415920 commit 24ba9c2
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 50 deletions.
15 changes: 1 addition & 14 deletions client/src/components/Tool/ToolCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const showHelpForum = computed(() => isConfigLoaded.value && config.value.enable
<template>
<div class="position-relative">
<div class="underlay sticky-top" />
<div class="ui-form-header-underlay sticky-top" />
<div class="tool-header sticky-top bg-secondary px-2 py-1 rounded">
<div class="d-flex justify-content-between">
<div class="py-1 d-flex flex-wrap flex-gapx-1">
Expand Down Expand Up @@ -209,19 +209,6 @@ const showHelpForum = computed(() => isConfigLoaded.value && config.value.enable
</template>
<style lang="scss" scoped>
@import "scss/theme/blue.scss";
.underlay::after {
content: "";
display: block;
position: absolute;
top: -$margin-h;
left: -0.5rem;
right: -0.5rem;
height: 50px;
background: linear-gradient($white 75%, change-color($white, $alpha: 0));
}
.fa-wrench {
cursor: unset;
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Workflow/Run/WorkflowRunFormSimple.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div>
<div v-if="isConfigLoaded">
<div class="ui-form-header-underlay sticky-top" />
<div v-if="isConfigLoaded" class="sticky-top">
<BAlert v-if="!canRunOnHistory" variant="warning" show>
<span v-localize>
The workflow cannot run because the current history is immutable. Please select a different history
Expand Down
66 changes: 31 additions & 35 deletions client/src/components/Workflow/WorkflowNavigationTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,14 @@ const workflowImportTitle = computed(() => {

<BAlert v-if="error" variant="danger" show>{{ error }}</BAlert>

<div class="position-relative">
<div v-if="workflow" class="ui-portlet-section">
<div class="d-flex portlet-header align-items-center">
<div class="position-relative mb-2">
<div v-if="workflow" class="bg-secondary px-2 py-1 rounded">
<div class="d-flex align-items-center flex-gapx-1">
<div class="flex-grow-1" data-description="workflow heading">
<div class="px-1">
<FontAwesomeIcon :icon="faSitemap" />
<b class="mx-1">
{{ props.invocation ? "Invoked " : "" }}Workflow: {{ getWorkflowName() }}
</b>
<i>(version: {{ workflow.version + 1 }})</i>
<div>
<FontAwesomeIcon :icon="faSitemap" fixed-width />
<b> {{ props.invocation ? "Invoked " : "" }}Workflow: {{ getWorkflowName() }} </b>
<span>(Version: {{ workflow.version + 1 }})</span>
</div>
</div>
<BButtonGroup>
Expand All @@ -119,8 +117,7 @@ const workflowImportTitle = computed(() => {
"
variant="link"
:disabled="workflow.deleted"
:to="`/workflows/edit?id=${workflow.id}&version=${workflow.version}`"
@click="() => {}">
:to="`/workflows/edit?id=${workflow.id}&version=${workflow.version}`">
<FontAwesomeIcon :icon="faEdit" fixed-width />
</BButton>
<AsyncButton
Expand All @@ -136,31 +133,30 @@ const workflowImportTitle = computed(() => {
</AsyncButton>

<slot name="workflow-title-actions" />

<ButtonSpinner
v-if="!props.invocation"
id="run-workflow"
data-description="execute workflow button"
:wait="runWaiting"
:disabled="runDisabled"
size="sm"
title="Run"
@onClick="emit('on-execute')" />
<WorkflowRunButton
v-else
:id="workflow.id"
data-description="route to workflow run button"
variant="link"
:title="
!workflow.deleted
? `<b>Rerun</b><br>${getWorkflowName()}`
: 'This workflow has been deleted.'
"
:disabled="workflow.deleted"
force
full
:version="workflow.version" />
</BButtonGroup>
<ButtonSpinner
v-if="!props.invocation"
id="run-workflow"
data-description="execute workflow button"
:wait="runWaiting"
:disabled="runDisabled"
size="sm"
title="Run Workflow"
@onClick="emit('on-execute')" />
<WorkflowRunButton
v-else
:id="workflow.id"
data-description="route to workflow run button"
variant="link"
:title="
!workflow.deleted
? `<b>Rerun</b><br>${getWorkflowName()}`
: 'This workflow has been deleted.'
"
:disabled="workflow.deleted"
force
full
:version="workflow.version" />
</div>
</div>
<div v-if="props.success" class="donemessagelarge">
Expand Down
11 changes: 11 additions & 0 deletions client/src/style/scss/ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ $ui-margin-horizontal-large: $margin-v * 2;
}
}

.ui-form-header-underlay::after {
content: "";
display: block;
position: absolute;
top: -$margin-h;
left: -0.5rem;
right: -0.5rem;
height: 50px;
background: linear-gradient($white 75%, change-color($white, $alpha: 0));
}

// popovers
.popover {
max-width: 70%;
Expand Down

0 comments on commit 24ba9c2

Please sign in to comment.