Skip to content

Commit a9a67dd

Browse files
committed
feat: adjust mailbox tree items apperance
1 parent 2a326e6 commit a9a67dd

2 files changed

Lines changed: 34 additions & 8 deletions

File tree

packages/web-app-mail/src/components/MailboxTree.vue

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,38 @@
1010
<oc-list v-else>
1111
<li v-for="mailbox in mailboxes" :key="mailbox.id" class="pb-1 px-2">
1212
<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"
1630
justify-content="left"
17-
appearance="raw"
18-
size="small"
1931
@click="onSelectMailbox(mailbox)"
2032
>
2133
<div class="flex items-center justify-between w-full">
2234
<div class="flex items-center truncate">
2335
<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" />
2537
</div>
2638
<oc-tag
2739
v-if="mailbox.unreadEmails"
2840
v-oc-tooltip="$gettext('Unread emails')"
41+
:rounded="true"
2942
class="ml-2"
3043
appearance="filled"
31-
:rounded="true"
44+
size="small"
3245
><span v-text="mailbox.unreadEmails"
3346
/></oc-tag>
3447
</div>
@@ -68,3 +81,16 @@ const onSelectMailbox = async (mailbox: Mailbox) => {
6881
await loadMails(unref(currentAccount).accountId, mailbox.id)
6982
}
7083
</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>

packages/web-runtime/src/components/SidebarNav/SidebarNavItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<span class="flex">
3030
<oc-icon :name="icon" :fill-type="fillType" />
3131
<span
32-
class="ml-4 text font-bold"
32+
class="ml-4 font-bold"
3333
:class="{ 'text-invisible opacity-0': collapsed }"
3434
v-text="name"
3535
/>

0 commit comments

Comments
 (0)