Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
23 changes: 21 additions & 2 deletions src/components/quickActions/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<template>
<div class="action">
<div class="action__info">
<DragIcon class="action__info__drag" :size="16" />
<DragIcon :class="'action__info__drag' + (!draggable ? ' undraggable' : '')" :size="16" />
<Icon class="action__info__icon" :action="action.name" />
<p v-if="!needsSelection">
{{ actionTitle }}
Expand All @@ -18,7 +18,11 @@
:model-value="selectedOption"
@update:modelValue="update" />
</div>
<NcButton :aria-label="t('mail', 'delete')" variant="tertiary-no-background" @click="$emit('delete')">
<NcButton
:aria-label="t('mail', 'delete')"
variant="tertiary-no-background"
class="delete-button"
@click="$emit('delete')">
<template #icon>
<CloseIcon :size="20" />
</template>
Expand Down Expand Up @@ -54,6 +58,11 @@ export default {
type: Object,
required: true,
},

draggable: {
type: Boolean,
required: true,
},
},

computed: {
Expand Down Expand Up @@ -134,13 +143,23 @@ export default {
align-items: center;
&__info{
display: flex;
flex-grow: 1;
&__icon{
margin-inline-end : 3px
}
&__drag{
margin-inline-end : 6px;
cursor: grab;

&.undraggable {
opacity: .2;
cursor: revert;
}
}
}

.delete-button {
margin-inline-start : 6px;
}
}
</style>
15 changes: 12 additions & 3 deletions src/components/quickActions/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<Action
:action="item"
:account="account"
:draggable="item.name !== 'deleteThread' && item.name !== 'moveThread'"
@update="(payload) => updateAction(payload, item)"
@delete="deleteAction(item)" />
</Draggable>
Expand Down Expand Up @@ -370,9 +371,10 @@ export default {
<style lang="scss" scoped>

.modal-content{
padding: 30px;
padding: 0 30px 30px 30px;

&__action{
padding: 9px;
padding: 6px 0;
}
&__save {
position: absolute;
Expand All @@ -382,9 +384,16 @@ export default {
}

:deep(.v-select){
display: flex;
display: grid;
grid-template-columns: 1fr 1fr;
flex-grow: 1;
align-items: center;
justify-content: space-between;
margin: 0;

.select__label {
margin: 0;
}
}

.modal-name{
Expand Down
Loading