-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19252 from ElectronicBlueberry/workflow-inputs-ac…
…tivity [24.2] Workflow Inputs Activity
- Loading branch information
Showing
18 changed files
with
244 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<script setup lang="ts"> | ||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | ||
import type { WorkflowInput } from "../Workflow/Editor/modules/inputs"; | ||
import ActivityPanel from "./ActivityPanel.vue"; | ||
const props = defineProps<{ | ||
inputs: WorkflowInput[]; | ||
}>(); | ||
const emit = defineEmits<{ | ||
(e: "insertModule", id: string, name: string, state: WorkflowInput["stateOverwrites"]): void; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<ActivityPanel title="Inputs"> | ||
<div class="input-list"> | ||
<button | ||
v-for="(input, index) in props.inputs" | ||
:key="index" | ||
:data-id="input.id ?? input.moduleId" | ||
class="workflow-input-button" | ||
@click="emit('insertModule', input.moduleId, input.title, input.stateOverwrites)"> | ||
<FontAwesomeIcon class="input-icon" fixed-width :icon="input.icon" /> | ||
<span class="input-title"> {{ input.title }} </span> | ||
<span class="input-description"> {{ input.description }} </span> | ||
</button> | ||
</div> | ||
</ActivityPanel> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
@import "theme/blue.scss"; | ||
.input-list { | ||
overflow-y: auto; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
} | ||
.workflow-input-button { | ||
border-radius: 0.5rem; | ||
border: 1px solid $gray-300; | ||
background: transparent; | ||
display: grid; | ||
grid-template-columns: auto 1fr; | ||
grid-template-areas: | ||
"i t" | ||
"d d"; | ||
text-align: left; | ||
gap: 0.25rem; | ||
align-items: center; | ||
&:hover, | ||
&:focus { | ||
background-color: $gray-100; | ||
border-color: $brand-primary; | ||
} | ||
&:active { | ||
background-color: $gray-200; | ||
border-color: $brand-primary; | ||
} | ||
.input-icon { | ||
grid-area: i; | ||
} | ||
.input-title { | ||
grid-area: t; | ||
font-weight: bold; | ||
} | ||
.input-description { | ||
grid-area: d; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.