diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index fcf2b356..59ab96d1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,10 +1,11 @@ Changelog ========= -3.2.2 (Unreleased) +Unreleased ---------------------- - Enh #382: Implement provider for meta searching - Fix #389: Fix notification about participant joining +- Enh #188: Add "Like" to message entries 3.2.1 (April 15, 2024) ---------------------- diff --git a/models/AbstractMessageEntry.php b/models/AbstractMessageEntry.php index 5bea4b3e..c38a7d97 100644 --- a/models/AbstractMessageEntry.php +++ b/models/AbstractMessageEntry.php @@ -21,7 +21,7 @@ * @property integer $id * @property integer $message_id * @property integer $user_id - * @property string $content + * @property string|null $content * @property integer $type * @property string $created_at * @property integer $created_by diff --git a/models/MessageEntry.php b/models/MessageEntry.php index 70b1b3de..a93684c5 100644 --- a/models/MessageEntry.php +++ b/models/MessageEntry.php @@ -3,8 +3,14 @@ namespace humhub\modules\mail\models; use DateTime; +use humhub\modules\content\widgets\richtext\AbstractRichText; +use humhub\modules\content\widgets\richtext\converter\RichTextToEmailHtmlConverter; +use humhub\modules\content\widgets\richtext\RichText; +use humhub\modules\like\interfaces\LikeNotificationInterface; +use humhub\modules\mail\helpers\Url; use humhub\modules\user\models\User; use Yii; +use yii\base\InvalidConfigException; /** * This class represents a message text within a conversation. @@ -12,7 +18,7 @@ * @package humhub.modules.mail.models * @since 0.5 */ -class MessageEntry extends AbstractMessageEntry +class MessageEntry extends AbstractMessageEntry implements LikeNotificationInterface { /** * @inheritdoc @@ -61,4 +67,27 @@ public function isFirstToday(): bool ->andWhere(['>=', 'created_at', $today]) ->exists(); } + + /** + * @inerhitdoc + * @throws InvalidConfigException + */ + public function getLikeNotificationPlainTextPreview(): string + { + return Yii::t('MailModule.base', 'Message') . ' ' . RichText::convert($this->content, AbstractRichText::FORMAT_SHORTTEXT); + } + + /** + * @inerhitdoc + * @throws InvalidConfigException + */ + public function getLikeNotificationHtmlPreview(): string + { + return RichTextToEmailHtmlConverter::process($this->content); + } + + public function getLikeNotificationUrl(bool $scheme = false): string + { + return Url::toMessenger($this->message, $scheme); + } } diff --git a/module.json b/module.json index ad941cb2..779ca051 100644 --- a/module.json +++ b/module.json @@ -1,32 +1,32 @@ { - "id": "mail", - "name": "Messenger", - "description": "A private messaging system for direct communication.", - "keywords": [ - "mail", - "messaging", - "messenger", - "communication" - ], - "version": "3.2.2", - "humhub": { - "minVersion": "1.16" - }, - "homepage": "https://github.com/humhub/mail", - "authors": [ - { - "name": "Andreas Strobel" + "id": "mail", + "name": "Messenger", + "description": "A private messaging system for direct communication.", + "keywords": [ + "mail", + "messaging", + "messenger", + "communication" + ], + "version": "3.2.2", + "humhub": { + "minVersion": "1.16.0" }, - { - "name": "Lucas Bartholemy" - }, - { - "name": "Julian Harrer" - } - ], - "screenshots": [ - "resources/screen1.PNG", - "resources/screen2.PNG", - "resources/screen3.PNG" - ] + "homepage": "https://github.com/humhub/mail", + "authors": [ + { + "name": "Andreas Strobel" + }, + { + "name": "Lucas Bartholemy" + }, + { + "name": "Julian Harrer" + } + ], + "screenshots": [ + "resources/screen1.PNG", + "resources/screen2.PNG", + "resources/screen3.PNG" + ] } diff --git a/resources/css/humhub.mail.css b/resources/css/humhub.mail.css index e8168c02..179eef07 100644 --- a/resources/css/humhub.mail.css +++ b/resources/css/humhub.mail.css @@ -241,6 +241,7 @@ float: right; font-size: 10px; color: var(--text-color-main); + padding-top: 4px; } .mail-conversation-entry .conversation-entry-time > span { font-style: italic; diff --git a/resources/css/humhub.mail.less b/resources/css/humhub.mail.less index ddabcfb4..2531498c 100644 --- a/resources/css/humhub.mail.less +++ b/resources/css/humhub.mail.less @@ -12,464 +12,465 @@ @screen-md: 991px; .semiBold() { - font-weight: 600 + font-weight: 600 } .placeholder { - color: #77777A; + color: #77777A; } #dropdown-messages { - .dropdown-header { - color: #000; - margin-bottom: 12px; - .semiBold; - } + .dropdown-header { + color: #000; + margin-bottom: 12px; + .semiBold; + } - &.dropdown-menu { - li { - a { - font-size: inherit !important; - } + &.dropdown-menu { + li { + a { + font-size: inherit !important; + } + } } - } - .media-body { - font-weight: 200; - } + .media-body { + font-weight: 200; + } } .modal-body { - #createmessage-message { - .ProseMirror { - min-height: 100px !important; + #createmessage-message { + .ProseMirror { + min-height: 100px !important; + } } - } } .media-list { - li.new { - background-color: @bgColorNew; - } + li.new { + background-color: @bgColorNew; + } } #mail-conversation-create-button, #create-message-button { - .fa { - margin: 0; - } + .fa { + margin: 0; + } } #conversation-filter-link { - padding-left: 0; - display: block; - padding-bottom: 0; + padding-left: 0; + display: block; + padding-bottom: 0; } #conversation-tags-root { - border-bottom: 1px solid #eee; + border-bottom: 1px solid #eee; - .my-tags-label { - padding-right: 10px; - } + .my-tags-label { + padding-right: 10px; + } } .conversation-menu { - display: none; + display: none; - .time { - color: inherit; - text-transform: none; - } + .time { + color: inherit; + text-transform: none; + } - .badge { - background-color: @bgColorDefault; - border-radius: @radius; - color: inherit; - } + .badge { + background-color: @bgColorDefault; + border-radius: @radius; + color: inherit; + } - .conversation-edit-button { - background-color: @bgColorDefault; - border-radius: @radiusRound; - color: inherit; + .conversation-edit-button { + background-color: @bgColorDefault; + border-radius: @radiusRound; + color: inherit; - &:hover { - background-color: @bgColorDefault; - color: inherit; + &:hover { + background-color: @bgColorDefault; + color: inherit; + } } - } } .visible-xs { - .conversation-menu { - padding-left: 35px; + .conversation-menu { + padding-left: 35px; - .conversation-menu-item { - margin-bottom: 10px; + .conversation-menu-item { + margin-bottom: 10px; + } } - } } .conversation-menu-item { - margin-left: 5px; + margin-left: 5px; - a { - cursor: pointer; - } + a { + cursor: pointer; + } } .conversation-edit-button { - border-bottom-right-radius: @radiusNone; - border-top-right-radius: @radiusNone; + border-bottom-right-radius: @radiusNone; + border-top-right-radius: @radiusNone; } .conversation-scroll-down-button { - position: absolute; - bottom: 58px; - right: 25px; - width: 38px; - height: 38px; - background: #fff; - border-radius: 50%; - box-shadow: 1px 1px 2px #999; - - .fa { - font-size: 26px; - margin: 7px 0 0 11px; - } + position: absolute; + bottom: 58px; + right: 25px; + width: 38px; + height: 38px; + background: #fff; + border-radius: 50%; + box-shadow: 1px 1px 2px #999; + + .fa { + font-size: 26px; + margin: 7px 0 0 11px; + } } .conversation-entry-list { - max-height: 600px; - min-height: 150px; - overflow: auto; + max-height: 600px; + min-height: 150px; + overflow: auto; - .media { - padding-right: 5px; - } + .media { + padding-right: 5px; + } } .conversation-entry-content { - display: table; - float: left; - background-color: @bgColorDefault; - border-radius: @radius; - padding: 10px; - max-width: 70%; - - pre { - max-width: 485px; - } - - &.own { - float: right; - background: var(--background-color-highlight); - } - - .markdown-render { + display: table; float: left; - width: 100%; - min-width: 230px; - } + background-color: @bgColorDefault; + border-radius: @radius; + padding: 10px; + max-width: 70%; + + pre { + max-width: 485px; + } + + &.own { + float: right; + background: var(--background-color-highlight); + } + + .markdown-render { + float: left; + width: 100%; + min-width: 230px; + } } .conversation-blocked-recipient { - -webkit-filter: grayscale(100%); - filter: grayscale(100%); + -webkit-filter: grayscale(100%); + filter: grayscale(100%); } #mail-conversation-root { - hr { - border-top: 1px solid #eee; - } + hr { + border-top: 1px solid #eee; + } - .ProsemirrorEditor.focusMenu { - .ProseMirror-menubar { - margin-top: -0; + .ProsemirrorEditor.focusMenu { + .ProseMirror-menubar { + margin-top: -0; + } } - } - .panel-body { - margin-bottom: 0; - } + .panel-body { + margin-bottom: 0; + } } #mail-conversation-header { - padding: 18px; - border-bottom: 1px solid var(--background3); - border-bottom-left-radius: @radiusNone; - border-bottom-right-radius: @radiusNone; + padding: 18px; + border-bottom: 1px solid var(--background3); + border-bottom-left-radius: @radiusNone; + border-bottom-right-radius: @radiusNone; - h1 { - .semiBold; - font-size: 22px; - display: inline-block; - } + h1 { + .semiBold; + font-size: 22px; + display: inline-block; + } - small { - display: block; - font-size: 11px; - font-weight: normal; + small { + display: block; + font-size: 11px; + font-weight: normal; - a { - color: var(--text-color-main); + a { + color: var(--text-color-main); + } } - } } #conversation-settings-button { - padding: 6px; - font-size: 12px; + padding: 6px; + font-size: 12px; } #mail-filter-root { - margin-top: 5px; + margin-top: 5px; } .mail-inbox-messages { - .panel-heading { - > a { - .semiBold; + .panel-heading { + > a { + .semiBold; + } + + #mail-filter-root > a { + font-weight: normal; + } } - #mail-filter-root > a { - font-weight: normal; + .media { + margin-top: 0; + display: flex; + + h4.media-heading { + .semiBold; + + time { + font-weight: normal; + float: right; + } + } + + h5 { + font-size: 11px; + font-weight: 500; + color: #000; + display: flex; + justify-content: space-between; + + span:first-child { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + .mail-last-entry { + font-size: 11px; + font-weight: normal; + color: var(--text-color-soft2); + } } - } - - .media { - margin-top: 0; - display: flex; - h4.media-heading { - .semiBold; - - time { - font-weight: normal; - float: right; - } + .selected, .media-list > li:hover { + .mail-last-entry { + color: var(--text-color-main); + } } +} - h5 { - font-size: 11px; - font-weight: 500; - color: #000; - display: flex; - justify-content: space-between; +.mail-message-form { + position: absolute; + bottom: 0; + width: 100%; + padding: 10px; - span:first-child { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + .humhub-ui-richtext { + padding-right: 105px; // For the upload and send button + border-radius: @radius; } - .mail-last-entry { - font-size: 11px; - font-weight: normal; - color: var(--text-color-soft2); + .upload-buttons { + position: absolute; + right: 15px; + bottom: 15px; + z-index: 500; } - } - .selected, .media-list > li:hover { - .mail-last-entry { - color: var(--text-color-main); + .reply-button { + margin-left: 0 !important; } - } -} - -.mail-message-form { - position: absolute; - bottom: 0; - width: 100%; - padding: 10px; - - .humhub-ui-richtext { - padding-right: 105px; // For the upload and send button - border-radius: @radius; - } - - .upload-buttons { - position: absolute; - right: 15px; - bottom: 15px; - z-index: 500; - } - - .reply-button { - margin-left: 0 !important; - } - .help-block { - margin: 0; - } + .help-block { + margin: 0; + } - .alert { - margin-bottom: 0; - } + .alert { + margin-bottom: 0; + } } .mail-conversation-entry { - margin-top: 3px; - position: relative; + margin-top: 3px; + position: relative; - .author-image { - .img-user { - max-width: 100%; + .author-image { + .img-user { + max-width: 100%; + } } - } - - .author-label { - font-size: 10px; - .semiBold; - } - &.hideUserInfo { .author-label { - display: none; + font-size: 10px; + .semiBold; } - .author-image { - a { - visibility: hidden; - margin-top: 0; - } + &.hideUserInfo { + .author-label { + display: none; + } + + .author-image { + a { + visibility: hidden; + margin-top: 0; + } + } } - } - &.own { - .conversation-menu-item { - float: right; - margin-left: 0; - margin-right: 5px; + &.own { + .conversation-menu-item { + float: right; + margin-left: 0; + margin-right: 5px; + } } - } - .conversation-entry-time { - float: right; - font-size: 10px; - color: var(--text-color-main); + .conversation-entry-time { + float: right; + font-size: 10px; + color: var(--text-color-main); + padding-top: 4px; - > span { - font-style: italic; + > span { + font-style: italic; + } } - } } .conversation-entry-badge { - padding: 10px 0 8px; - text-align: center; - - span { - display: inline-block; - box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); - border-radius: @radiusMiddle; - padding: 5px 20px; - } + padding: 10px 0 8px; + text-align: center; + + span { + display: inline-block; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); + border-radius: @radiusMiddle; + padding: 5px 20px; + } - &.conversation-date-badge span { - text-transform: uppercase; - } + &.conversation-date-badge span { + text-transform: uppercase; + } } #inbox { - max-height: 500px; - overflow: auto; - border-radius: @radiusSmall; + max-height: 500px; + overflow: auto; + border-radius: @radiusSmall; } .messagePreviewEntry { - cursor: pointer; - - time { - font-size: 10px; - color: var(--text-color-secondary); - } + cursor: pointer; - .new-message-badge { - display: none; - } + time { + font-size: 10px; + color: var(--text-color-secondary); + } - &.unread { .new-message-badge { - display: block; + display: none; } - time { - color: @colorUnread; - } + &.unread { + .new-message-badge { + display: block; + } + + time { + color: @colorUnread; + } - .mail-last-entry { - color: var(--text-color-main); + .mail-last-entry { + color: var(--text-color-main); + } } - } } .message-tag-filter-group { - .select2-selection { - border-bottom-right-radius: @radiusNone; - } + .select2-selection { + border-bottom-right-radius: @radiusNone; + } - .manage-tags-link { - .semiBold; - font-size: 0.8em; - border: 1px solid #ededed; - border-top: 0; - border-bottom-left-radius: @radiusSmall; - border-bottom-right-radius: @radiusSmall; - padding: 2px 5px; - } + .manage-tags-link { + .semiBold; + font-size: 0.8em; + border: 1px solid #ededed; + border-top: 0; + border-bottom-left-radius: @radiusSmall; + border-bottom-right-radius: @radiusSmall; + padding: 2px 5px; + } } .new-message-badge { - float: right; - min-width: 16px; - height: 16px; - border-radius: 50%; - background: @colorUnread; - margin-left: 2px; + float: right; + min-width: 16px; + height: 16px; + border-radius: 50%; + background: @colorUnread; + margin-left: 2px; } .inbox-entry-title { - .semiBold; + .semiBold; } .field-replyform-message { - margin: 0; + margin: 0; } @media (max-width: @screen-md) { - #inbox { - max-height: 500px !important; - } + #inbox { + max-height: 500px !important; + } } @media (max-width: @screen-sm) { - #dropdown-messages { - width: 300px !important; - } - - .arrow { - margin-left: -101px !important; - } + #dropdown-messages { + width: 300px !important; + } - #inbox { - max-height: none !important; - } + .arrow { + margin-left: -101px !important; + } - .mail-conversation-single-message { #inbox { - max-height: none !important; + max-height: none !important; } - .inbox-wrapper { - display: none; + .mail-conversation-single-message { + #inbox { + max-height: none !important; + } + + .inbox-wrapper { + display: none; + } } - } - .conversation-entry-content { - pre { - max-width: 245px; - padding: 0; + .conversation-entry-content { + pre { + max-width: 245px; + padding: 0; + } } - } } diff --git a/resources/css/humhub.mail.min.css b/resources/css/humhub.mail.min.css index f250ce3c..55be9017 100644 --- a/resources/css/humhub.mail.min.css +++ b/resources/css/humhub.mail.min.css @@ -1 +1 @@ -.placeholder{color:#77777a}#dropdown-messages .dropdown-header{color:#000;margin-bottom:12px;font-weight:600}#dropdown-messages.dropdown-menu li a{font-size:inherit!important}#dropdown-messages .media-body{font-weight:200}.modal-body #createmessage-message .ProseMirror{min-height:100px!important}.media-list li.new{background-color:#e9f9ff}#create-message-button .fa,#mail-conversation-create-button .fa{margin:0}#conversation-filter-link{padding-left:0;display:block;padding-bottom:0}#conversation-tags-root{border-bottom:1px solid #eee}#conversation-tags-root .my-tags-label{padding-right:10px}.conversation-menu{display:none}.conversation-menu .time{color:inherit;text-transform:none}.conversation-menu .badge{background-color:var(--background-color-secondary);border-radius:10px;color:inherit}.conversation-menu .conversation-edit-button{background-color:var(--background-color-secondary);border-radius:50%;color:inherit}.conversation-menu .conversation-edit-button:hover{background-color:var(--background-color-secondary);color:inherit}.visible-xs .conversation-menu{padding-left:35px}.visible-xs .conversation-menu .conversation-menu-item{margin-bottom:10px}.conversation-menu-item{margin-left:5px}.conversation-menu-item a{cursor:pointer}.conversation-edit-button{border-bottom-right-radius:0;border-top-right-radius:0}.conversation-scroll-down-button{position:absolute;bottom:58px;right:25px;width:38px;height:38px;background:#fff;border-radius:50%;box-shadow:1px 1px 2px #999}.conversation-scroll-down-button .fa{font-size:26px;margin:7px 0 0 11px}.conversation-entry-list{max-height:600px;min-height:150px;overflow:auto}.conversation-entry-list .media{padding-right:5px}.conversation-entry-content{display:table;float:left;background-color:var(--background-color-secondary);border-radius:10px;padding:10px;max-width:70%}.conversation-entry-content pre{max-width:485px}.conversation-entry-content.own{float:right;background:var(--background-color-highlight)}.conversation-entry-content .markdown-render{float:left;width:100%;min-width:230px}.conversation-blocked-recipient{-webkit-filter:grayscale(100%);filter:grayscale(100%)}#mail-conversation-root hr{border-top:1px solid #eee}#mail-conversation-root .ProsemirrorEditor.focusMenu .ProseMirror-menubar{margin-top:0}#mail-conversation-root .panel-body{margin-bottom:0}#mail-conversation-header{padding:18px;border-bottom:1px solid var(--background3);border-bottom-left-radius:0;border-bottom-right-radius:0}#mail-conversation-header h1{font-weight:600;font-size:22px;display:inline-block}#mail-conversation-header small{display:block;font-size:11px;font-weight:400}#mail-conversation-header small a{color:var(--text-color-main)}#conversation-settings-button{padding:6px;font-size:12px}#mail-filter-root{margin-top:5px}.mail-inbox-messages .panel-heading>a{font-weight:600}.mail-inbox-messages .panel-heading #mail-filter-root>a{font-weight:400}.mail-inbox-messages .media{margin-top:0;display:flex}.mail-inbox-messages .media h4.media-heading{font-weight:600}.mail-inbox-messages .media h4.media-heading time{font-weight:400;float:right}.mail-inbox-messages .media h5{font-size:11px;font-weight:500;color:#000;display:flex;justify-content:space-between}.mail-inbox-messages .media h5 span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-inbox-messages .media .mail-last-entry{font-size:11px;font-weight:400;color:var(--text-color-soft2)}.mail-inbox-messages .media-list>li:hover .mail-last-entry,.mail-inbox-messages .selected .mail-last-entry{color:var(--text-color-main)}.mail-message-form{position:absolute;bottom:0;width:100%;padding:10px}.mail-message-form .humhub-ui-richtext{padding-right:105px;border-radius:10px}.mail-message-form .upload-buttons{position:absolute;right:15px;bottom:15px;z-index:500}.mail-message-form .reply-button{margin-left:0!important}.mail-message-form .help-block{margin:0}.mail-message-form .alert{margin-bottom:0}.mail-conversation-entry{margin-top:3px;position:relative}.mail-conversation-entry .author-image .img-user{max-width:100%}.mail-conversation-entry .author-label{font-size:10px;font-weight:600}.mail-conversation-entry.hideUserInfo .author-label{display:none}.mail-conversation-entry.hideUserInfo .author-image a{visibility:hidden;margin-top:0}.mail-conversation-entry.own .conversation-menu-item{float:right;margin-left:0;margin-right:5px}.mail-conversation-entry .conversation-entry-time{float:right;font-size:10px;color:var(--text-color-main)}.mail-conversation-entry .conversation-entry-time>span{font-style:italic}.conversation-entry-badge{padding:10px 0 8px;text-align:center}.conversation-entry-badge span{display:inline-block;box-shadow:1px 1px 3px rgba(0,0,0,.3);border-radius:7px;padding:5px 20px}.conversation-entry-badge.conversation-date-badge span{text-transform:uppercase}#inbox{max-height:500px;overflow:auto;border-radius:4px}.messagePreviewEntry{cursor:pointer}.messagePreviewEntry time{font-size:10px;color:var(--text-color-secondary)}.messagePreviewEntry .new-message-badge{display:none}.messagePreviewEntry.unread .new-message-badge{display:block}.messagePreviewEntry.unread time{color:var(--info)}.messagePreviewEntry.unread .mail-last-entry{color:var(--text-color-main)}.message-tag-filter-group .select2-selection{border-bottom-right-radius:0}.message-tag-filter-group .manage-tags-link{font-weight:600;font-size:.8em;border:1px solid #ededed;border-top:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:2px 5px}.new-message-badge{float:right;min-width:16px;height:16px;border-radius:50%;background:var(--info);margin-left:2px}.inbox-entry-title{font-weight:600}.field-replyform-message{margin:0}@media (max-width:991px){#inbox{max-height:500px!important}}@media (max-width:767px){#dropdown-messages{width:300px!important}.arrow{margin-left:-101px!important}#inbox{max-height:none!important}.mail-conversation-single-message #inbox{max-height:none!important}.mail-conversation-single-message .inbox-wrapper{display:none}.conversation-entry-content pre{max-width:245px;padding:0}} \ No newline at end of file +.placeholder{color:#77777a}#dropdown-messages .dropdown-header{color:#000;margin-bottom:12px;font-weight:600}#dropdown-messages.dropdown-menu li a{font-size:inherit!important}#dropdown-messages .media-body{font-weight:200}.modal-body #createmessage-message .ProseMirror{min-height:100px!important}.media-list li.new{background-color:#e9f9ff}#create-message-button .fa,#mail-conversation-create-button .fa{margin:0}#conversation-filter-link{padding-left:0;display:block;padding-bottom:0}#conversation-tags-root{border-bottom:1px solid #eee}#conversation-tags-root .my-tags-label{padding-right:10px}.conversation-menu{display:none}.conversation-menu .time{color:inherit;text-transform:none}.conversation-menu .badge{background-color:var(--background-color-secondary);border-radius:10px;color:inherit}.conversation-menu .conversation-edit-button{background-color:var(--background-color-secondary);border-radius:50%;color:inherit}.conversation-menu .conversation-edit-button:hover{background-color:var(--background-color-secondary);color:inherit}.visible-xs .conversation-menu{padding-left:35px}.visible-xs .conversation-menu .conversation-menu-item{margin-bottom:10px}.conversation-menu-item{margin-left:5px}.conversation-menu-item a{cursor:pointer}.conversation-edit-button{border-bottom-right-radius:0;border-top-right-radius:0}.conversation-scroll-down-button{position:absolute;bottom:58px;right:25px;width:38px;height:38px;background:#fff;border-radius:50%;box-shadow:1px 1px 2px #999}.conversation-scroll-down-button .fa{font-size:26px;margin:7px 0 0 11px}.conversation-entry-list{max-height:600px;min-height:150px;overflow:auto}.conversation-entry-list .media{padding-right:5px}.conversation-entry-content{display:table;float:left;background-color:var(--background-color-secondary);border-radius:10px;padding:10px;max-width:70%}.conversation-entry-content pre{max-width:485px}.conversation-entry-content.own{float:right;background:var(--background-color-highlight)}.conversation-entry-content .markdown-render{float:left;width:100%;min-width:230px}.conversation-blocked-recipient{-webkit-filter:grayscale(100%);filter:grayscale(100%)}#mail-conversation-root hr{border-top:1px solid #eee}#mail-conversation-root .ProsemirrorEditor.focusMenu .ProseMirror-menubar{margin-top:0}#mail-conversation-root .panel-body{margin-bottom:0}#mail-conversation-header{padding:18px;border-bottom:1px solid var(--background3);border-bottom-left-radius:0;border-bottom-right-radius:0}#mail-conversation-header h1{font-weight:600;font-size:22px;display:inline-block}#mail-conversation-header small{display:block;font-size:11px;font-weight:400}#mail-conversation-header small a{color:var(--text-color-main)}#conversation-settings-button{padding:6px;font-size:12px}#mail-filter-root{margin-top:5px}.mail-inbox-messages .panel-heading>a{font-weight:600}.mail-inbox-messages .panel-heading #mail-filter-root>a{font-weight:400}.mail-inbox-messages .media{margin-top:0;display:flex}.mail-inbox-messages .media h4.media-heading{font-weight:600}.mail-inbox-messages .media h4.media-heading time{font-weight:400;float:right}.mail-inbox-messages .media h5{font-size:11px;font-weight:500;color:#000;display:flex;justify-content:space-between}.mail-inbox-messages .media h5 span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-inbox-messages .media .mail-last-entry{font-size:11px;font-weight:400;color:var(--text-color-soft2)}.mail-inbox-messages .media-list>li:hover .mail-last-entry,.mail-inbox-messages .selected .mail-last-entry{color:var(--text-color-main)}.mail-message-form{position:absolute;bottom:0;width:100%;padding:10px}.mail-message-form .humhub-ui-richtext{padding-right:105px;border-radius:10px}.mail-message-form .upload-buttons{position:absolute;right:15px;bottom:15px;z-index:500}.mail-message-form .reply-button{margin-left:0!important}.mail-message-form .help-block{margin:0}.mail-message-form .alert{margin-bottom:0}.mail-conversation-entry{margin-top:3px;position:relative}.mail-conversation-entry .author-image .img-user{max-width:100%}.mail-conversation-entry .author-label{font-size:10px;font-weight:600}.mail-conversation-entry.hideUserInfo .author-label{display:none}.mail-conversation-entry.hideUserInfo .author-image a{visibility:hidden;margin-top:0}.mail-conversation-entry.own .conversation-menu-item{float:right;margin-left:0;margin-right:5px}.mail-conversation-entry .conversation-entry-time{float:right;font-size:10px;color:var(--text-color-main);padding-top:4px}.mail-conversation-entry .conversation-entry-time>span{font-style:italic}.conversation-entry-badge{padding:10px 0 8px;text-align:center}.conversation-entry-badge span{display:inline-block;box-shadow:1px 1px 3px rgba(0,0,0,.3);border-radius:7px;padding:5px 20px}.conversation-entry-badge.conversation-date-badge span{text-transform:uppercase}#inbox{max-height:500px;overflow:auto;border-radius:4px}.messagePreviewEntry{cursor:pointer}.messagePreviewEntry time{font-size:10px;color:var(--text-color-secondary)}.messagePreviewEntry .new-message-badge{display:none}.messagePreviewEntry.unread .new-message-badge{display:block}.messagePreviewEntry.unread time{color:var(--info)}.messagePreviewEntry.unread .mail-last-entry{color:var(--text-color-main)}.message-tag-filter-group .select2-selection{border-bottom-right-radius:0}.message-tag-filter-group .manage-tags-link{font-weight:600;font-size:.8em;border:1px solid #ededed;border-top:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:2px 5px}.new-message-badge{float:right;min-width:16px;height:16px;border-radius:50%;background:var(--info);margin-left:2px}.inbox-entry-title{font-weight:600}.field-replyform-message{margin:0}@media (max-width:991px){#inbox{max-height:500px!important}}@media (max-width:767px){#dropdown-messages{width:300px!important}.arrow{margin-left:-101px!important}#inbox{max-height:none!important}.mail-conversation-single-message #inbox{max-height:none!important}.mail-conversation-single-message .inbox-wrapper{display:none}.conversation-entry-content pre{max-width:245px;padding:0}} \ No newline at end of file diff --git a/widgets/ConversationEntryLinks.php b/widgets/ConversationEntryLinks.php new file mode 100644 index 00000000..f0aaa2d6 --- /dev/null +++ b/widgets/ConversationEntryLinks.php @@ -0,0 +1,40 @@ +initDefaultWidgets(); + parent::init(); + } + + public function initDefaultWidgets() + { + $this->addWidget(LikeLink::class, ['object' => $this->object], ['sortOrder' => 200]); + } + +} diff --git a/widgets/views/conversationEntry.php b/widgets/views/conversationEntry.php index 0cff45e3..1bc5d0d7 100644 --- a/widgets/views/conversationEntry.php +++ b/widgets/views/conversationEntry.php @@ -5,7 +5,7 @@ use humhub\modules\file\widgets\ShowFiles; use humhub\modules\mail\models\MessageEntry; use humhub\modules\mail\widgets\ConversationDateBadge; -use humhub\modules\mail\widgets\ConversationEntryMenu; +use humhub\modules\mail\widgets\ConversationEntryLinks; use humhub\modules\mail\widgets\MessageEntryTime; use humhub\modules\ui\view\components\View; use humhub\modules\user\widgets\Image; @@ -44,10 +44,11 @@ content) ?> $entry]) ?> - $entry]) ?> +
+ $entry]) ?> + $entry]) ?> +
- - $entry]) ?>