From 78259a72dccfe446774bec08c14b3e53fe058bb0 Mon Sep 17 00:00:00 2001 From: Dorra Jaouad Date: Fri, 21 Mar 2025 17:15:12 +0100 Subject: [PATCH] feat(icons): add icon for calendar events conversations Signed-off-by: Dorra Jaouad --- REUSE.toml | 2 +- css/icons.css | 12 ++++++++++++ img/icon-conversation-event-bright.svg | 6 ++++++ img/icon-conversation-event-dark.svg | 6 ++++++ img/icon-event-white.svg | 4 ++++ lib/Service/AvatarService.php | 3 +++ src/components/ConversationIcon.vue | 2 ++ src/constants.ts | 1 + src/types/index.ts | 1 + 9 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 img/icon-conversation-event-bright.svg create mode 100644 img/icon-conversation-event-dark.svg create mode 100644 img/icon-event-white.svg diff --git a/REUSE.toml b/REUSE.toml index 6151b7b6f3..adbf347eda 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -66,7 +66,7 @@ SPDX-FileCopyrightText = "Nextcloud GmbH " SPDX-License-Identifier = "LicenseRef-NextcloudTrademarks" [[annotations]] -path = ["img/bridge-bot.png", "img/bridge-services/irc.svg", "img/bridge-services/msteams.svg", "img/bridge-services/slack.svg", "img/bridge-services/steam.svg", "img/bridge-services/xmpp.svg", "img/folder-multiple-image.svg", "img/icon-contacts-white.svg", "img/icon-conversation-federation-bright.svg", "img/icon-conversation-federation-dark.svg", "img/icon-conversation-group-bright.svg", "img/icon-conversation-group-dark.svg", "img/icon-conversation-mail-bright.svg", "img/icon-conversation-mail-dark.svg", "img/icon-conversation-password-bright.svg", "img/icon-conversation-password-dark.svg", "img/icon-conversation-phone-bright.svg", "img/icon-conversation-phone-dark.svg", "img/icon-conversation-public-bright.svg", "img/icon-conversation-public-dark.svg", "img/icon-conversation-text-bright.svg", "img/icon-conversation-text-dark.svg", "img/icon-conversation-user-bright.svg", "img/icon-conversation-user-dark.svg", "img/icon-mail-white.svg", "img/icon-password-white.svg", "img/icon-phone-white.svg", "img/icon-public-white.svg", "img/icon-team-white.svg", "img/icon-text-white.svg", "img/icon-user-white.svg", "img/menu-people.svg", "img/no-password.svg", "img/phone.png", "img/reply.svg"] +path = ["img/bridge-bot.png", "img/bridge-services/irc.svg", "img/bridge-services/msteams.svg", "img/bridge-services/slack.svg", "img/bridge-services/steam.svg", "img/bridge-services/xmpp.svg", "img/folder-multiple-image.svg", "img/icon-contacts-white.svg", "img/icon-conversation-event-bright.svg", "img/icon-conversation-event-dark.svg", "img/icon-conversation-federation-bright.svg", "img/icon-conversation-federation-dark.svg", "img/icon-conversation-group-bright.svg", "img/icon-conversation-group-dark.svg", "img/icon-conversation-mail-bright.svg", "img/icon-conversation-mail-dark.svg", "img/icon-conversation-password-bright.svg", "img/icon-conversation-password-dark.svg", "img/icon-conversation-phone-bright.svg", "img/icon-conversation-phone-dark.svg", "img/icon-conversation-public-bright.svg", "img/icon-conversation-public-dark.svg", "img/icon-conversation-text-bright.svg", "img/icon-conversation-text-dark.svg", "img/icon-conversation-user-bright.svg", "img/icon-conversation-user-dark.svg", "img/icon-event-white.svg", "img/icon-mail-white.svg", "img/icon-password-white.svg", "img/icon-phone-white.svg", "img/icon-public-white.svg", "img/icon-team-white.svg", "img/icon-text-white.svg", "img/icon-user-white.svg", "img/menu-people.svg", "img/no-password.svg", "img/phone.png", "img/reply.svg"] precedence = "aggregate" SPDX-FileCopyrightText = "2018-2024 Google LLC" SPDX-License-Identifier = "Apache-2.0" diff --git a/css/icons.css b/css/icons.css index e149ff6fc0..85cb44edd9 100644 --- a/css/icons.css +++ b/css/icons.css @@ -46,6 +46,18 @@ background-image: url(../img/icon-phone-white.svg); } +.app-talk .icon-event, +.modal-mask .icon-event, +.v-popper__popper .icon-event, +.talk-sidebar-callview .icon-event, +#talk-panel .icon-event, +#talk-sidebar .icon-event, +#call-container .icon-event, +.talkChatTab .icon-event { + background-image: url(../img/icon-event-white.svg); +} + + .app-talk .icon-password, .modal-mask .icon-password, .v-popper__popper .icon-password, diff --git a/img/icon-conversation-event-bright.svg b/img/icon-conversation-event-bright.svg new file mode 100644 index 0000000000..62856a3320 --- /dev/null +++ b/img/icon-conversation-event-bright.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/img/icon-conversation-event-dark.svg b/img/icon-conversation-event-dark.svg new file mode 100644 index 0000000000..82de613c9a --- /dev/null +++ b/img/icon-conversation-event-dark.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/img/icon-event-white.svg b/img/icon-event-white.svg new file mode 100644 index 0000000000..107443b58a --- /dev/null +++ b/img/icon-event-white.svg @@ -0,0 +1,4 @@ + + calendar-blank + + \ No newline at end of file diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php index 2cd0bb433e..c05456979c 100644 --- a/lib/Service/AvatarService.php +++ b/lib/Service/AvatarService.php @@ -270,6 +270,9 @@ class AvatarService { if (in_array($room->getObjectType(), [Room::OBJECT_TYPE_PHONE_PERSIST, Room::OBJECT_TYPE_PHONE_TEMPORARY, Room::OBJECT_TYPE_PHONE_LEGACY], true)) { return __DIR__ . '/../../img/icon-conversation-phone-' . $colorTone . '.svg'; } + if ($room->getObjectType() === Room::OBJECT_TYPE_EVENT) { + return __DIR__ . '/../../img/icon-conversation-event-' . $colorTone . '.svg'; + } if ($room->isFederatedConversation()) { return __DIR__ . '/../../img/icon-conversation-federation-' . $colorTone . '.svg'; } diff --git a/src/components/ConversationIcon.vue b/src/components/ConversationIcon.vue index 5691ebfd46..fa27ef9b14 100644 --- a/src/components/ConversationIcon.vue +++ b/src/components/ConversationIcon.vue @@ -190,6 +190,8 @@ export default { || this.item.objectType === CONVERSATION.OBJECT_TYPE.PHONE_PERSISTENT || this.item.objectType === CONVERSATION.OBJECT_TYPE.PHONE_TEMPORARY) { return 'icon-phone' + } else if (this.item.objectType === CONVERSATION.OBJECT_TYPE.EVENT) { + return 'icon-event' } else if (this.item.objectType === CONVERSATION.OBJECT_TYPE.CIRCLES) { return 'icon-team' } else if (this.item.type === CONVERSATION.TYPE.CHANGELOG) { diff --git a/src/constants.ts b/src/constants.ts index a3b6cf20a7..4bb9824ee1 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -98,6 +98,7 @@ export const CONVERSATION = { OBJECT_TYPE: { EMAIL: 'emails', + EVENT: 'event', FILE: 'file', /** @deprecated */ PHONE_LEGACY: 'phone', diff --git a/src/types/index.ts b/src/types/index.ts index 2ad570e5c9..a990f2c86d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -119,6 +119,7 @@ export type createConversationParams = Required[ export type createConversationResponse = ApiResponse export type legacyCreateConversationParams = Pick export type deleteConversationResponse = ApiResponse +export type unbindConversationFromObjectResponse = ApiResponse export type setConversationNameParams = Required['requestBody']['content']['application/json'] export type setConversationNameResponse = ApiResponse