-
Notifications
You must be signed in to change notification settings - Fork 26
Feat/1959 #2125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tammi-23
wants to merge
17
commits into
main
Choose a base branch
from
feat/1959
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/1959 #2125
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4f3b474
Added draft state handling
tammi-23 8b790a8
wip: only adding name
tammi-23 7f4f45b
Apply suggestions from code review
tammi-23 afff1e6
wip: added suggestions from review
tammi-23 0e82e17
wip: added suggestions from review2
tammi-23 c6c1586
wip: implemented reviewer feedback
tammi-23 106af7c
wip: rolled back Pinia Stores
tammi-23 96fa9be
wip: review adjustments
tammi-23 1ebb7cb
delete composable
tammi-23 2ccda4c
feat: add mailactionbar with edit draft
tammi-23 09c3130
chore: clean up rebased mail action bar branch
tammi-23 258aaf9
wip: prevent data loss when loading a draft email
tammi-23 84b490e
Merge branch 'main' into feat/1959
tammi-23 13599ae
linting fix
tammi-23 8cfce96
Merge branch 'main' into feat/1959
tammi-23 02aaaa8
added missing watch
tammi-23 2bf4b31
wip: use useMailCompose
tammi-23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,23 @@ | ||
| <template> | ||
| <div v-if="hasActions" class="hidden md:flex items-center h-14 -mx-4 px-4 border-b"> | ||
| <oc-button appearance="raw" :aria-label="$gettext('Edit draft')" @click="$emit('edit-draft')"> | ||
| <oc-icon name="pencil" fill-type="line" size="medium" /> | ||
| </oc-button> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { computed, unref } from 'vue' | ||
| import type { Mail } from '../types' | ||
|
|
||
| const props = defineProps<{ | ||
| mail: Mail | ||
| }>() | ||
|
|
||
| defineEmits<{ | ||
| (e: 'edit-draft'): void | ||
| }>() | ||
|
|
||
| const isDraft = computed(() => Boolean(props.mail?.keywords?.$draft)) | ||
| const hasActions = computed(() => unref(isDraft)) | ||
| </script> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,30 @@ | ||
| import { ref } from 'vue' | ||
| import { Mail } from '../types' | ||
|
|
||
| const isOpen = ref(false) | ||
| const draftMail = ref<Mail | null>(null) | ||
|
|
||
| export const useMailCompose = () => { | ||
| const openNewCompose = () => { | ||
| draftMail.value = null | ||
| isOpen.value = true | ||
| } | ||
|
|
||
| const openDraftCompose = (mail: Mail) => { | ||
| draftMail.value = mail | ||
| isOpen.value = true | ||
| } | ||
|
|
||
| const closeCompose = () => { | ||
| isOpen.value = false | ||
| draftMail.value = null | ||
| } | ||
|
|
||
| return { | ||
| isOpen, | ||
| draftMail, | ||
| openNewCompose, | ||
| openDraftCompose, | ||
| closeCompose | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.