Skip to content

Commit

Permalink
fixup! feat: mail filters
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb committed Oct 1, 2024
1 parent 6ddc604 commit 3444c7f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/components/mailFilter/Action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<script>
import ActionFileinto from './ActionFileinto.vue'
import ActionAddflag from './ActionAddflag.vue'
import ActionStop from './ActionStop.vue'
import { NcButton, NcSelect, NcTextField } from '@nextcloud/vue'
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
Expand All @@ -45,6 +46,7 @@ export default {
NcButton,
ActionFileinto,
ActionAddflag,
ActionStop,
DeleteIcon,
},
props: {
Expand All @@ -62,7 +64,6 @@ export default {
availableTypes: [
'addflag',
'fileinto',
'keep',
'stop',
],
}
Expand All @@ -73,6 +74,8 @@ export default {
return ActionFileinto
} else if (this.action.type === 'addflag') {
return ActionAddflag
} else if (this.action.type === 'stop') {
return ActionStop
}
return null
},
Expand Down
8 changes: 6 additions & 2 deletions src/components/mailFilter/ActionAddflag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcTextField id="mail-filter-value"
:required="true"
<NcTextField :required="true"
:label="t('mail', 'Flag')"
:value="flag"
@update:value="onInput" />
Expand Down Expand Up @@ -39,3 +38,8 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.input-field {
min-width: 260px;
}
</style>
1 change: 1 addition & 0 deletions src/components/mailFilter/ActionFileinto.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<NcSelect ref="select"
:value="mailbox"
:options="mailboxes"
:required="true"
@input="onInput" />
</template>
<script>
Expand Down
23 changes: 23 additions & 0 deletions src/components/mailFilter/ActionStop.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<p>{{ t('mail', 'The stop action ends all processing') }}</p>
</template>
<script>
export default {
name: 'ActionStop',
props: {
action: {
type: Object,
required: true,
},
account: {
type: Object,
required: true,
},
},
}
</script>
7 changes: 3 additions & 4 deletions src/components/mailFilter/Test.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
<div class="mail-filter-rows">
<div class="mail-filter-rows__row">
<div class="mail-filter-rows__row__column">
<NcSelect id="mail-filter-field"
input-label="field"
<NcSelect input-label="field"
:value="test.field"
:required="true"
:label-outside="true"
Expand All @@ -34,14 +33,14 @@
</div>
</div>
<div class="mail-filter-rows__row">
<NcSelect id="mail-filter-value"
v-model="localValues"
<NcSelect v-model="localValues"
input-label="value"
class="mail-filter-rows__row__select"
:multiple="true"
:wrap="true"
:close-on-select="false"
:taggable="true"
:required="true"
@option:selected="updateTest({ values: localValues })"
@option:deselected="updateTest({ values: localValues })" />
</div>
Expand Down

0 comments on commit 3444c7f

Please sign in to comment.