Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
eef11eb
feat: added groupware config store
tammi-23 Oct 15, 2025
6150b6d
feat: added groupeware store
tammi-23 Oct 15, 2025
a7bb2cf
wip: settings
tammi-23 Oct 15, 2025
5a7dbb5
wip: compose stuff
tammi-23 Oct 15, 2025
ef98344
wip: working /groupware endpoint
tammi-23 Oct 15, 2025
71fb42c
load groupware config from server
AlexAndBear Oct 15, 2025
c75127a
fix wrong description
AlexAndBear Oct 16, 2025
f11b830
wip: webappmail
tammi-23 Oct 16, 2025
28a4b8b
wip: routing for mailapp
tammi-23 Oct 16, 2025
41861ee
wip: Inbox.vue
tammi-23 Oct 16, 2025
c3aaf9a
wip
AlexAndBear Oct 16, 2025
c63fa6b
wip: add MailListItem
tammi-23 Oct 16, 2025
a64c7d2
wip
AlexAndBear Oct 17, 2025
7c97f83
wip types
AlexAndBear Oct 17, 2025
d34e327
wip types
AlexAndBear Oct 17, 2025
c481b1d
wip: maildetailview
tammi-23 Oct 17, 2025
ab01052
fix
AlexAndBear Oct 17, 2025
bb4bd88
change naming
AlexAndBear Oct 17, 2025
87a4593
change naming
AlexAndBear Oct 17, 2025
7312701
Maildetails
tammi-23 Oct 17, 2025
b4c7735
mailbody
tammi-23 Oct 17, 2025
a47091f
working return
tammi-23 Oct 17, 2025
e04226d
cleanup
tammi-23 Oct 17, 2025
89eff7e
scroll inbox + use DomePurify
AlexAndBear Oct 17, 2025
97658f0
fix scroll
AlexAndBear Oct 17, 2025
17bfe5f
add mobile support
AlexAndBear Oct 18, 2025
0d47d86
fix button styling
AlexAndBear Oct 18, 2025
ee71b9b
add textbody for mail
tammi-23 Oct 20, 2025
6f35a08
added MailID to watcher
tammi-23 Oct 20, 2025
41c31fd
added helper function
tammi-23 Oct 20, 2025
1c704ff
lint
AlexAndBear Oct 20, 2025
9cb20a8
added MailAttachmentList
tammi-23 Oct 20, 2025
dd42361
attachmantview
tammi-23 Oct 20, 2025
7cc4404
add download action
AlexAndBear Oct 20, 2025
fb1cd00
filter attachments
AlexAndBear Oct 20, 2025
ce8a1a4
add collapsing feature
AlexAndBear Oct 20, 2025
89449fc
add indicators
AlexAndBear Oct 21, 2025
e79f006
add indicators
AlexAndBear Oct 21, 2025
b74feb3
add truncate to mail attachment names
AlexAndBear Oct 21, 2025
41fa51e
remove class block
AlexAndBear Oct 21, 2025
eb5295d
mailindicators
tammi-23 Oct 21, 2025
8420fe9
add capability
AlexAndBear Oct 22, 2025
e989621
MailIndocators minor adjustments
AlexAndBear Oct 22, 2025
21674b1
add no-hover to raw buttons
AlexAndBear Oct 22, 2025
14e13d6
added mailindicator to detailview
tammi-23 Oct 22, 2025
d5fe191
added tooltip to mail indicators
tammi-23 Oct 22, 2025
76440e8
add selected state
AlexAndBear Oct 22, 2025
78e683e
adding mailboxes
tammi-23 Oct 24, 2025
36a04cc
cleanup
AlexAndBear Oct 24, 2025
5116eda
added Schema for accounts
tammi-23 Oct 24, 2025
9b26634
added Account schmema
tammi-23 Oct 24, 2025
94e0e80
added Mailaccountlist
tammi-23 Oct 24, 2025
c0d52dd
fix schema
AlexAndBear Oct 24, 2025
183a4c1
fix schema
AlexAndBear Oct 24, 2025
4e3e0e7
center avatar
AlexAndBear Oct 24, 2025
fa3a20b
adjust mail-app bootstrapping
AlexAndBear Oct 25, 2025
50b9e90
rm unused func
AlexAndBear Oct 25, 2025
d68dc23
Show account name in MailBox Tree
AlexAndBear Oct 25, 2025
1299eb1
Add more bottom spacing for attachment list
AlexAndBear Oct 25, 2025
f498ce8
Add mobile spacing
AlexAndBear Oct 25, 2025
fb823e8
Add back button
AlexAndBear Oct 25, 2025
fe83fde
add mobile flow
AlexAndBear Oct 25, 2025
1ac8ee5
Make it functional on mobile
AlexAndBear Oct 25, 2025
5278dbc
fix console output
AlexAndBear Oct 25, 2025
c49036b
Fix icon
AlexAndBear Oct 25, 2025
e1514f7
make stalwart accessible via https://stalwart.opencloud.test
AlexAndBear Oct 25, 2025
78d65b6
make stalwart accessible via http://stalwart.opencloud.test:8080
AlexAndBear Oct 25, 2025
30249b7
undo
AlexAndBear Oct 25, 2025
9d919ea
bind stalwart to 8081
AlexAndBear Oct 25, 2025
a389f11
remove uneeded port
AlexAndBear Oct 25, 2025
23c8d7d
fix types
AlexAndBear Oct 26, 2025
36aa5c6
recover pnpm-lock.yaml
AlexAndBear Oct 26, 2025
5885427
remove console.log
AlexAndBear Oct 26, 2025
0f65940
mailaccount styling
tammi-23 Oct 27, 2025
3a7de38
fix styling bug
AlexAndBear Oct 27, 2025
cf888b1
adjusted stalwart config
tammi-23 Oct 27, 2025
b38005d
add mobile headline for mail list
AlexAndBear Oct 27, 2025
d7f40f9
account width adjustment
AlexAndBear Oct 27, 2025
b4fadfb
wip appointment
AlexAndBear Oct 27, 2025
bd2aa89
fix ical parsing
AlexAndBear Oct 27, 2025
11d8fe6
add unread mail badge
AlexAndBear Oct 28, 2025
9d388ca
fix oc tag filled border roles
AlexAndBear Oct 28, 2025
34acc5d
truncate mailboxname
AlexAndBear Oct 28, 2025
247e048
adjust truncate
AlexAndBear Oct 28, 2025
b46efbf
added styling to Mailappointments
tammi-23 Oct 28, 2025
cf9324c
added description to mailappointments
tammi-23 Oct 28, 2025
159e860
control querys via watchers
AlexAndBear Oct 28, 2025
dc6cc7a
adjust margins
AlexAndBear Oct 28, 2025
05a6bcf
cleanup MailAppointmentItem
AlexAndBear Oct 29, 2025
7d097c1
add write email button
tammi-23 Oct 29, 2025
f3bfe48
added recommended changes
tammi-23 Oct 30, 2025
257a930
Changed Organizier handling in ical handling
tammi-23 Nov 3, 2025
326bcf0
fixed truncation issue
tammi-23 Nov 3, 2025
356f07f
fix types
AlexAndBear Nov 3, 2025
929b745
remove unused class
AlexAndBear Nov 3, 2025
754a6db
remove unused key
AlexAndBear Nov 3, 2025
db26a97
adjust mail list paddings
AlexAndBear Nov 3, 2025
236bdb2
Update mail compose button
AlexAndBear Nov 3, 2025
ffb9770
add missing luxon package
AlexAndBear Nov 3, 2025
e4a51ac
Added first mailcompose itteration
tammi-23 Nov 3, 2025
4659924
Cleaned up code
tammi-23 Nov 3, 2025
df228e0
fix types
AlexAndBear Nov 3, 2025
df83fde
change way how route query is set on mail compose
AlexAndBear Nov 3, 2025
ccd0371
change compose mail strategy
AlexAndBear Nov 3, 2025
2a6e653
fix types
AlexAndBear Nov 4, 2025
f66f7ea
fix unit tests
AlexAndBear Nov 4, 2025
d15ad85
react to code review
AlexAndBear Nov 4, 2025
938aea5
fix back button on mail compose
AlexAndBear Nov 4, 2025
0e99e3e
refactor: dedupe flex class
JammingBen Nov 4, 2025
3dfdd06
recover docker tag
AlexAndBear Nov 5, 2025
d8ba35f
update lockfile
AlexAndBear Nov 5, 2025
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
3 changes: 2 additions & 1 deletion dev/docker/opencloud.web.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"epub-reader",
"app-store",
"activities",
"preview"
"preview",
"mail"
]
}
114 changes: 114 additions & 0 deletions dev/docker/stalwart/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
authentication.fallback-admin.secret = "$6$4qPYDVhaUHkKcY7s$bB6qhcukb9oFNYRIvaDZgbwxrMa2RvF5dumCjkBFdX19lSNqrgKltf3aPrFMuQQKkZpK2YNuQ83hB1B3NiWzj."
authentication.fallback-admin.user = "mailadmin"
authentication.master.secret = "$6$4qPYDVhaUHkKcY7s$bB6qhcukb9oFNYRIvaDZgbwxrMa2RvF5dumCjkBFdX19lSNqrgKltf3aPrFMuQQKkZpK2YNuQ83hB1B3NiWzj."
authentication.master.user = "master"
directory.idmldap.attributes.class = "objectClass"
directory.idmldap.attributes.description = "displayName"
directory.idmldap.attributes.email = "mail"
directory.idmldap.attributes.email-alias = "mailAlias"
directory.idmldap.attributes.groups = "memberOf"
directory.idmldap.attributes.name = "cn"
directory.idmldap.attributes.secret = "userPassword"
directory.idmldap.attributes.secret-changed = "pwdChangedTime"
directory.idmldap.base-dn = "o=libregraph-idm"
directory.idmldap.bind.auth.method = "default"
directory.idmldap.bind.dn = "uid=reva,ou=sysusers,o=libregraph-idm"
directory.idmldap.bind.secret = "some-ldap-reva-password"
directory.idmldap.cache.size = 1048576
directory.idmldap.cache.ttl.negative = "10m"
directory.idmldap.cache.ttl.positive = "1h"
directory.idmldap.filter.email = "(|(mail=?)(mailAlias=?))"
directory.idmldap.filter.name = "(cn=?)"
directory.idmldap.timeout = "15s"
directory.idmldap.tls.allow-invalid-certs = true
directory.idmldap.tls.enable = true
directory.idmldap.type = "ldap"
directory.idmldap.url = "ldaps://opencloud:9235"
directory.keycloak.auth.method = "user-token"
directory.keycloak.cache.size = 1048576
directory.keycloak.cache.ttl.negative = "10m"
directory.keycloak.cache.ttl.positive = "1h"
directory.keycloak.endpoint.method = "introspect"
directory.keycloak.endpoint.url = "http://keycloak:8080/realms/openCloud/protocol/openid-connect/userinfo"
directory.keycloak.fields.email = "email"
directory.keycloak.fields.full-name = "name"
directory.keycloak.fields.username = "preferred_username"
directory.keycloak.timeout = "15s"
directory.keycloak.type = "oidc"
directory.ldap.attributes.class = "objectClass"
directory.ldap.attributes.description = "displayName"
directory.ldap.attributes.email = "mail"
directory.ldap.attributes.email-alias = "mailAlias"
directory.ldap.attributes.groups = "memberOf"
directory.ldap.attributes.name = "uid"
directory.ldap.attributes.secret = "userPassword"
directory.ldap.attributes.secret-changed = "pwdChangedTime"
directory.ldap.base-dn = "dc=opencloud,dc=eu"
directory.ldap.bind.auth.dn = "cn=?,ou=users,dc=opencloud,dc=eu"
directory.ldap.bind.auth.enable = true
directory.ldap.bind.auth.search = true
directory.ldap.bind.dn = "cn=admin,dc=opencloud,dc=eu"
directory.ldap.bind.secret = "admin"
directory.ldap.cache.ttl.negative = "10m"
directory.ldap.cache.ttl.positive = "1h"
directory.ldap.filter.email = "(&(|(objectClass=person)(objectClass=groupOfNames))(|(uid=?)(mail=?)(mailAlias=?)(cn=?)))"
directory.ldap.filter.name = "(&(|(objectClass=person)(objectClass=groupOfNames))(|(uid=?)(cn=?)))"
directory.ldap.timeout = "5s"
directory.ldap.tls.allow-invalid-certs = true
directory.ldap.tls.enable = true
directory.ldap.type = "ldap"
directory.ldap.url = "ldap://ldap-server:1389"
http.allowed-endpoint = 200
http.hsts = true
http.permissive-cors = false
http.url = "protocol + '://' + config_get('server.hostname') + ':' + local_port"
http.server.hostname = "stalwart.opencloud.test"
http.use-x-forwarded = true
metrics.prometheus.auth.secret = "secret"
metrics.prometheus.auth.username = "metrics"
metrics.prometheus.enable = true
server.tls.enable = true
server.listener.http.bind = ["[::]:8180"]
server.listener.http.protocol = "http"
server.listener.https.bind = "0.0.0.0:443"
server.listener.https.protocol = "http"
server.listener.https.tls.implicit = true
server.listener.imap.bind = "0.0.0.0:143"
server.listener.imap.protocol = "imap"
server.listener.imaptls.bind = "0.0.0.0:993"
server.listener.imaptls.protocol = "imap"
server.listener.imaptls.tls.implicit = true
server.listener.pop3.bind = "0.0.0.0:110"
server.listener.pop3.protocol = "pop3"
server.listener.pop3s.bind = "0.0.0.0:995"
server.listener.pop3s.protocol = "pop3"
server.listener.pop3s.tls.implicit = true
server.listener.sieve.bind = "0.0.0.0:4190"
server.listener.sieve.protocol = "managesieve"
server.listener.smtp.bind = "0.0.0.0:25"
server.listener.smtp.protocol = "smtp"
server.listener.submission.bind = "0.0.0.0:587"
server.listener.submission.protocol = "smtp"
server.listener.submissions.bind = "0.0.0.0:465"
server.listener.submissions.protocol = "smtp"
server.listener.submissions.tls.implicit = true
server.max-connections = 8192
server.socket.backlog = 1024
server.socket.nodelay = true
server.socket.reuse-addr = true
server.socket.reuse-port = true
storage.blob = "rocksdb"
storage.data = "rocksdb"
storage.directory = "%{env:STALWART_AUTH_DIRECTORY}%"
storage.fts = "rocksdb"
storage.lookup = "rocksdb"
store.rocksdb.compression = "lz4"
store.rocksdb.path = "/opt/stalwart/data"
store.rocksdb.type = "rocksdb"
tracer.console.ansi = true
tracer.console.buffered = true
tracer.console.enable = true
tracer.console.level = "trace"
tracer.console.lossy = false
tracer.console.multiline = false
tracer.console.type = "stdout"
58 changes: 53 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ x-opencloud-server: &opencloud-service
#FRONTEND
FRONTEND_SEARCH_MIN_LENGTH: '2'
FRONTEND_FULL_TEXT_SEARCH_ENABLED: 'true'
FRONTEND_GROUPWARE_ENABLED: 'true'
GRAPH_INCLUDE_OCM_SHAREES: 'true'

# IDM
Expand All @@ -35,6 +36,7 @@ x-opencloud-server: &opencloud-service

# IDP
IDP_LDAP_BIND_PASSWORD: '${IDP_LDAP_BIND_PASSWORD:-some-ldap-idp-password}'
IDM_LDAPS_ADDR: 0.0.0.0:9235

# STORAGE
STORAGE_USERS_DRIVER: '${STORAGE_USERS_DRIVER:-posix}'
Expand Down Expand Up @@ -82,9 +84,12 @@ services:
opencloud:
<<: *opencloud-service
container_name: web_oc
networks:
- traefik
environment:
<<: *opencloud-environment
OC_URL: ${OC_URL:-https://host.docker.internal:9200}
OC_ADD_RUN_SERVICES: groupware
OC_CORS_ALLOW_ORIGINS: https://host.docker.internal:9200,https://host.docker.internal:9201
OCM_WEBAPP_TEMPLATE: https://host.docker.internal:9201/o/{{.Token}}/{relative-path-to-shared-resource}
# make the registry available to the app provider containers
Expand All @@ -96,6 +101,7 @@ services:
GRAPH_AVAILABLE_ROLES: b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5,a8d5fe5e-96e3-418d-825b-534dbdf22b99,fb6c3e19-e378-47e5-b277-9732f9de6e21,58c63c02-1d89-4572-916a-870abc5a1b7d,2d00ce52-1fc2-4dbc-8b95-a73b73395f5a,1c996275-f1c9-4e71-abdf-a42f6495e960,312c0871-5ef7-4b3a-85b6-0e4074c64049,aa97fe03-7980-45ac-9e50-b325749fd7e6,63e64e19-8d43-42ec-a738-2b6af2610efa
labels:
traefik.enable: true
traefik.docker.network: traefik
traefik.http.routers.opencloud.tls: true
traefik.http.routers.opencloud.rule: Host(`host.docker.internal`) && PathPrefix(`/`)
traefik.http.routers.opencloud.entrypoints: opencloud
Expand All @@ -117,13 +123,16 @@ services:
opencloud-federated:
<<: *opencloud-service
container_name: web_opencloud_federated
networks:
- traefik
environment:
<<: *opencloud-environment
OC_URL: https://oc.opencloud.test:10200
OC_CORS_ALLOW_ORIGINS: https://oc.opencloud.test:10201
OCM_WEBAPP_TEMPLATE: https://oc.opencloud.test:10201/o/{{.Token}}/{relative-path-to-shared-resource}
labels:
traefik.enable: true
traefik.docker.network: traefik
traefik.http.routers.opencloud-federated.tls: true
traefik.http.routers.opencloud-federated.rule: Host(`oc.opencloud.test`) && PathPrefix(`/`)
traefik.http.routers.opencloud-federated.entrypoints: opencloud-federated
Expand Down Expand Up @@ -233,9 +242,10 @@ services:
- '--entrypoints.wopi.address=:8880'
- '--entrypoints.collaboration.address=:9300'
- '--entrypoints.collaboration-oo.address=:9302'
- '--entrypoints.websecure.address=:443'
- '--entrypoints.websecure.http.middlewares=https_config@docker'
- '--entrypoints.websecure.http.tls.options=default'
- '--entrypoints.stalwart-tls.address=:443'
- '--entrypoints.stalwart-tls.http.middlewares=https_config@docker'
- '--entrypoints.stalwart-tls.http.tls.options=default'
- '--entrypoints.stalwart.address=:8180'
labels:
traefik.enable: true
traefik.http.routers.http_catchall.rule: HostRegexp(`{any:.+}`)
Expand All @@ -253,18 +263,22 @@ services:

ports:
- '80:80'
- '8090:8080'
- '8180:8180'
- '9200:9200'
- '9300:9300'
- '9302:9302'
- '10200:10200'
- '9980:9980'
- '8880:8880'
- '9981:443'
- '443:443'
volumes:
- './dev/docker/traefik/certificates:/certificates'
- './dev/docker/traefik/configs:/configs'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
networks:
traefik:
aliases:
- ${STALWART_DOMAIN:-stalwart.opencloud.test}

tika-service:
image: dadarek/wait-for-dependencies:latest
Expand Down Expand Up @@ -294,10 +308,44 @@ services:
- ./dev/docker/radicale/data:/data
restart: unless-stopped

stalwart:
image: ghcr.io/stalwartlabs/stalwart:v0.13.4-alpine
hostname: ${STALWART_DOMAIN:-stalwart.opencloud.test}
depends_on:
opencloud:
condition: service_started
networks:
- traefik
ports:
- '127.0.0.1:143:143'
- '127.0.0.1:993:993'
- '127.0.0.1:1465:465'
volumes:
- ./dev/docker/stalwart/localtime:/etc/localtime:ro
- ./dev/docker/stalwart/config.toml:/opt/stalwart/etc/config.toml
- stalwart-data:/opt/stalwart/data
environment:
STALWART_AUTH_DIRECTORY: '${STALWART_AUTH_DIRECTORY:-idmldap}'
labels:
traefik.enable: true
traefik.http.routers.stalwart.entrypoints: stalwart-tls
#traefik.http.routers.stalwart.entrypoints: https
#traefik.http.routers.stalwart.rule: Host(`host.docker.internal`) && PathPrefix(`/`)
traefik.http.routers.stalwart.rule: Host(`stalwart.opencloud.test`)
#traefik.http.routers.stalwart.tls.certresolver: http
traefik.http.routers.stalwart.service: stalwart
traefik.http.routers.stalwart-http.entrypoints: stalwart
traefik.http.routers.stalwart-http.rule: Host(`stalwart.opencloud.test`)
traefik.http.routers.stalwart-http.service: stalwart
traefik.http.services.stalwart.loadbalancer.server.port: 8180
logging:
driver: ${LOG_DRIVER:-local}

volumes:
uploads:
opencloud-config:
opencloud-federated-config:
stalwart-data:

networks:
traefik:
6 changes: 3 additions & 3 deletions packages/design-system/src/components/OcTag/OcTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ const appearanceClasses = computed(() => {

switch (color) {
case 'primary':
classes.push('bg-role-primary', 'text-role-on-primary', 'border-role-on-primary')
classes.push('bg-role-primary', 'text-role-on-primary', 'border-role-primary')
break
case 'secondary':
classes.push('bg-role-secondary', 'text-role-on-secondary', 'border-role-on-secondary')
classes.push('bg-role-secondary', 'text-role-on-secondary', 'border-role-secondary')
break
case 'tertiary':
classes.push('bg-role-tertiary', 'text-role-on-tertiary', 'border-role-on-tertiary')
classes.push('bg-role-tertiary', 'text-role-on-tertiary', 'border-role-tertiary')
break
}
return classes
Expand Down
10 changes: 10 additions & 0 deletions packages/web-app-mail/l10n/.tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com

[o:opencloud-eu:p:opencloud-eu:r:web-app-mail]
file_filter = locale/<lang>/app.po
minimum_perc = 0
resource_name = web-app-mail
source_file = template.pot
source_lang = en
type = PO
1 change: 1 addition & 0 deletions packages/web-app-mail/l10n/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
29 changes: 29 additions & 0 deletions packages/web-app-mail/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "web-app-mail",
"version": "0.0.0",
"private": true,
"description": "OpenCloud groupware mail app",
"license": "AGPL-3.0",
"devDependencies": {
"@opencloud-eu/web-test-helpers": "workspace:*"
},
"peerDependencies": {
"@opencloud-eu/design-system": "workspace:^",
"@opencloud-eu/web-client": "workspace:*",
"@opencloud-eu/web-pkg": "workspace:*",
"axios": "1.12.2",
"fuse.js": "7.1.0",
"lodash-es": "4.17.21",
"mark.js": "^8.11.1",
"pinia": "3.0.3",
"vue-concurrency": "5.0.3",
"vue-router": "^4.2.5",
"vue3-gettext": "2.4.0",
"zod": "4.1.12",
"dompurify": "^3.2.3",
"luxon": "^3.5.0"
},
"dependencies": {
"ical.js": "^2.2.1"
}
}
3 changes: 3 additions & 0 deletions packages/web-app-mail/src/EmptyLayoutContainer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<router-view />
</template>
7 changes: 7 additions & 0 deletions packages/web-app-mail/src/LayoutContainer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<main id="mail" class="h-full overflow-hidden">
<router-view data-testid="mail-router-view" />
</main>
</template>

<script setup lang="ts"></script>
1 change: 1 addition & 0 deletions packages/web-app-mail/src/appid.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const APPID = 'mail'
42 changes: 42 additions & 0 deletions packages/web-app-mail/src/components/MailAccountList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<div class="flex justify-center">
<app-loading-spinner v-if="isLoading" />
<oc-list v-else>
<li v-for="account in accounts" :key="account.accountId">
<oc-button
v-oc-tooltip="account.name"
class="account-list-item mt-4"
no-hover
appearance="raw"
@click="$emit('select', account)"
>
<oc-avatar
:class="{
'border-2 border-role-secondary': selectedAccount?.accountId === account.accountId
}"
:user-name="account.name"
/>
</oc-button>
</li>
</oc-list>
</div>
</template>

<script setup lang="ts">
import { AppLoadingSpinner } from '@opencloud-eu/web-pkg'
import type { MailAccount } from '../types'

defineEmits<{
(e: 'select', payload: MailAccount): void
}>()

const {
accounts = [],
selectedAccount = null,
isLoading = false
} = defineProps<{
accounts?: MailAccount[]
selectedAccount?: MailAccount
isLoading?: boolean
}>()
</script>
Loading
Loading