-
Notifications
You must be signed in to change notification settings - Fork 29
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 #1738 from ProcessMaker/feature/FOUR-13436
FOUR-13436 Screen Builder Clipboard
- Loading branch information
Showing
53 changed files
with
1,485 additions
and
193 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,77 @@ | ||
<template> | ||
<!-- Conditionally render buttons based on clipboardContent --> | ||
<button | ||
v-if="isInClipboard" | ||
class="btn btn-sm btn-outline-secondary mr-2 remove-btn" | ||
:title="removeTitle" | ||
@click="removeFromClipboard" | ||
data-cy="removeFromClipboard" | ||
> | ||
<i class="fas fa-minus"></i> | ||
</button> | ||
|
||
<button | ||
v-else | ||
class="btn btn-sm btn-success mr-2 add-btn" | ||
:title="addTitle" | ||
@click="addToClipboard(index)" | ||
data-cy="addToClipboard" | ||
> | ||
<i class="fas fa-plus"></i> | ||
</button> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
index: { | ||
type: Number, | ||
required: true, | ||
}, | ||
config: { | ||
type: Object, | ||
required: true, | ||
}, | ||
isInClipboard: { | ||
type: Boolean, | ||
required: true, | ||
}, | ||
addTitle: { | ||
type: String, | ||
required: false, | ||
default: 'Add to clipboard', | ||
}, | ||
removeTitle: { | ||
type: String, | ||
required: false, | ||
default: 'Remove from clipboard', | ||
} | ||
}, | ||
methods: { | ||
// Method to handle adding to clipboard | ||
addToClipboard(index) { | ||
this.$emit('addToClipboard'); | ||
}, | ||
// Method to handle removing from clipboard | ||
removeFromClipboard() { | ||
this.$emit('removeFromClipboard'); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.remove-btn { | ||
background-color: #FFFFFF; | ||
color: #596372; | ||
} | ||
.remove-btn:hover { | ||
background-color: #f8f9fa; | ||
color: #596372; | ||
} | ||
.add-btn { | ||
background-color: #0CA442; | ||
} | ||
</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
Oops, something went wrong.