Skip to content

Commit

Permalink
Change style of "add" button (#401)
Browse files Browse the repository at this point in the history
* Change of "add" button

* Change text style in top panel

* Nice scroller for top mail panel

* Fix style of top mail panel
  • Loading branch information
yurabakhtin authored Jul 5, 2024
1 parent eaa5c44 commit bce3e4f
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: PHP CS Fixer
on: push

jobs:
tests:
fixers:
uses: humhub/actions/.github/workflows/module-php-cs-fixer.yml@main
22 changes: 11 additions & 11 deletions resources/css/humhub.mail.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,31 +160,31 @@
}
.mail-inbox-messages .media h4.media-heading {
font-weight: 600;
font-size: 16px;
}
.mail-inbox-messages .media h4.media-heading time {
font-size: 11px !important;
font-weight: normal;
float: right;
}
.mail-inbox-messages .media h5 {
font-size: 11px;
font-size: 14px;
line-height: 16px;
font-weight: 500;
color: #000;
display: flex;
justify-content: space-between;
margin: 7px 0;
}
.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: normal;
color: var(--text-color-soft2);
}
.mail-inbox-messages .selected .mail-last-entry,
.mail-inbox-messages .media-list > li:hover .mail-last-entry {
color: var(--text-color-main);
font-size: 14px;
font-weight: 500;
color: var(--text-color-secondary);
}
.mail-message-form {
position: absolute;
Expand Down Expand Up @@ -277,7 +277,7 @@
color: var(--info);
}
.messagePreviewEntry.unread .mail-last-entry {
color: var(--text-color-main);
color: var(--text-color-highlight);
}
.message-tag-filter-group .select2-selection {
border-bottom-right-radius: 0;
Expand All @@ -293,8 +293,8 @@
}
.new-message-badge {
float: right;
min-width: 16px;
height: 16px;
min-width: 14px;
height: 14px;
border-radius: 50%;
background: var(--info);
margin-left: 2px;
Expand Down
24 changes: 11 additions & 13 deletions resources/css/humhub.mail.less
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,23 @@

h4.media-heading {
.semiBold;
font-size: 16px;

time {
font-size: 11px !important;
font-weight: normal;
float: right;
}
}

h5 {
font-size: 11px;
font-size: 14px;
line-height: 16px;
font-weight: 500;
color: #000;
display: flex;
justify-content: space-between;
margin: 7px 0;

span:first-child {
overflow: hidden;
Expand All @@ -257,15 +261,9 @@
}

.mail-last-entry {
font-size: 11px;
font-weight: normal;
color: var(--text-color-soft2);
}
}

.selected, .media-list > li:hover {
.mail-last-entry {
color: var(--text-color-main);
font-size: 14px;
font-weight: 500;
color: var(--text-color-secondary);
}
}
}
Expand Down Expand Up @@ -392,7 +390,7 @@
}

.mail-last-entry {
color: var(--text-color-main);
color: var(--text-color-highlight);
}
}
}
Expand All @@ -415,8 +413,8 @@

.new-message-badge {
float: right;
min-width: 16px;
height: 16px;
min-width: 14px;
height: 14px;
border-radius: 50%;
background: @colorUnread;
margin-left: 2px;
Expand Down
2 changes: 1 addition & 1 deletion resources/css/humhub.mail.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions resources/js/humhub.mail.notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,29 @@ humhub.module('mail.notification', function (module, require, $) {
currentXhr.abort();
}

const messageLoader = $('#loader_messages');
const messageList = messageLoader.parent();

// remove all <li> entries from dropdown
$('#loader_messages').parent().find(':not(#loader_messages)').remove();
loader.set($('#loader_messages').show());
messageLoader.parent().find(':not(#loader_messages)').remove();
loader.set(messageLoader.show());

client.get(module.config.url.list, {
beforeSend: function (xhr) {
currentXhr = xhr;
}
}).then(function (response) {
currentXhr = undefined;
$('#loader_messages').parent().prepend($(response.html));
$('#loader_messages').hide();
messageList.prepend($(response.html));
messageLoader.hide();
messageList.niceScroll({
cursorwidth: '7',
cursorborder: '',
cursorcolor: '#555',
cursoropacitymax: '0.2',
nativeparentscrolling: false,
railpadding: {top: 0, right: 3, left: 0, bottom: 0}
});
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion resources/js/humhub.mail.notification.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions widgets/NewMessageButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class NewMessageButton extends Widget
/**
* @var bool
*/
public $right = false;
public $right = true;

/**
* @var string
Expand All @@ -49,7 +49,7 @@ class NewMessageButton extends Widget
*/
public function run()
{
$button = ModalButton::info($this->getLabel())->load(Url::toCreateConversation($this->guid))->id($this->id);
$button = ModalButton::defaultType($this->getLabel())->load(Url::toCreateConversation($this->guid))->id($this->id);

if($this->icon) {
$button->icon($this->icon);
Expand Down

0 comments on commit bce3e4f

Please sign in to comment.