Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 apps/profile/lib/Controller/ProfileApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ private function getSharedCalendarEvents(string $userId) {
'label' => $event['objects'][0]['SUMMARY'][0],
'text' => $this->formatter->formatTimeSpan($start, \DateTime::createFromImmutable($now)),
'href' => $href,
'img' => $this->urlGenerator->getAbsoluteURL($this->appManager->getAppIcon('calendar')),
'img' => $this->urlGenerator->getAbsoluteURL($this->appManager->getAppIcon('calendar', true)),
'themedIcon' => true,
];
}
return $result;
Expand Down
3 changes: 2 additions & 1 deletion apps/profile/lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* label: string,
* text: string,
* href: string,
* img: string
* img: string,
* themedIcon?: bool,
* }
*/
class ResponseDefinitions {
Expand Down
5 changes: 5 additions & 0 deletions apps/profile/src/components/SharedResourcesSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const title = computed(() => t('profile', 'You & {user}', { user: props.displayN
<template #icon>
<img
class="shared-resources__icon"
:class="{ 'shared-resources__icon--themed': resource.themedIcon }"
:src="resource.img"
alt=""
decoding="async"
Expand Down Expand Up @@ -74,6 +75,10 @@ const title = computed(() => t('profile', 'You & {user}', { user: props.displayN
height: 32px;
object-fit: contain;
border-radius: var(--border-radius);

&--themed {
filter: var(--background-invert-if-dark);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions apps/profile/src/services/sharedResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export interface SharedResource {
text: string
href: string
img: string
/** Monochrome app icon that should follow the text color via CSS filter. */
themedIcon?: boolean
}

interface OcsResponse<T> {
Expand Down
Loading