|
10 | 10 | <oc-list v-else> |
11 | 11 | <li v-for="mailbox in mailboxes" :key="mailbox.id" class="pb-1 px-2"> |
12 | 12 | <oc-button |
13 | | - class="w-full p-2 hover:bg-role-surface-container-highest focus:bg-role-surface-container-highest" |
14 | | - :class="{ '!bg-role-secondary-container': currentMailbox?.id === mailbox.id }" |
15 | | - no-hover |
| 13 | + :class="[ |
| 14 | + 'sidebar-mailbox-item', |
| 15 | + 'relative', |
| 16 | + 'w-full', |
| 17 | + 'whitespace-nowrap', |
| 18 | + 'px-2', |
| 19 | + 'py-3', |
| 20 | + 'select-none', |
| 21 | + 'rounded-xl', |
| 22 | + { 'active overflow-hidden outline': currentMailbox?.id === mailbox.id }, |
| 23 | + { |
| 24 | + 'hover:bg-role-surface-container-highest focus:bg-role-surface-container-highest': |
| 25 | + currentMailbox?.id !== mailbox.id |
| 26 | + } |
| 27 | + ]" |
| 28 | + :appearance="currentMailbox?.id === mailbox.id ? 'filled' : 'raw-inverse'" |
| 29 | + color-role="surface" |
16 | 30 | justify-content="left" |
17 | | - appearance="raw" |
18 | | - size="small" |
19 | 31 | @click="onSelectMailbox(mailbox)" |
20 | 32 | > |
21 | 33 | <div class="flex items-center justify-between w-full"> |
22 | 34 | <div class="flex items-center truncate"> |
23 | 35 | <oc-icon name="folder" class="mr-2" fill-type="line" /> |
24 | | - <span class="truncate" v-text="mailbox.name" /> |
| 36 | + <span class="truncate font-bold" v-text="mailbox.name" /> |
25 | 37 | </div> |
26 | 38 | <oc-tag |
27 | 39 | v-if="mailbox.unreadEmails" |
28 | 40 | v-oc-tooltip="$gettext('Unread emails')" |
| 41 | + :rounded="true" |
29 | 42 | class="ml-2" |
30 | 43 | appearance="filled" |
31 | | - :rounded="true" |
| 44 | + size="small" |
32 | 45 | ><span v-text="mailbox.unreadEmails" |
33 | 46 | /></oc-tag> |
34 | 47 | </div> |
@@ -68,3 +81,16 @@ const onSelectMailbox = async (mailbox: Mailbox) => { |
68 | 81 | await loadMails(unref(currentAccount).accountId, mailbox.id) |
69 | 82 | } |
70 | 83 | </script> |
| 84 | + |
| 85 | +<style> |
| 86 | +@reference '@opencloud-eu/design-system/tailwind'; |
| 87 | +
|
| 88 | +@layer components { |
| 89 | + .sidebar-mailbox-item:is(.active) { |
| 90 | + outline-color: var(--oc-role-surface-container-highest); |
| 91 | + } |
| 92 | + .sidebar-mailbox-item:not(.active) { |
| 93 | + color: var(--oc-role-on-surface-variant); |
| 94 | + } |
| 95 | +} |
| 96 | +</style> |
0 commit comments