PeerTube/client/src/app/header/notification-dropdown.compo...

136 lines
2.6 KiB
SCSS

@use '_variables' as *;
@use '_mixins' as *;
.content {
scrollbar-color: auto;
}
.notification-inbox-dropdown.hidden {
display: none;
}
::ng-deep {
.dropdown-notifications {
max-width: none;
top: -6px !important;
left: 7px !important;
.dropdown-menu {
padding: 0;
font-size: 14px;
font-family: $main-fonts;
width: 400px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
.loader {
display: flex;
align-items: center;
justify-content: center;
padding: 5px 0;
}
.content {
max-height: 150px;
transition: max-height 0.15s ease-out;
display: flex;
height: 500px;
flex-direction: column;
&.loaded {
max-height: 500px;
}
> my-user-notifications:nth-child(2) {
overflow-y: auto;
flex-grow: 1;
}
}
.notifications-header {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
align-items: center;
padding: 0 12px;
font-size: 14px;
font-weight: bold;
color: rgba(0, 0, 0, 0.5);
text-transform: uppercase;
min-height: 40px;
a {
@include disable-default-a-behaviour;
}
button {
padding: 0;
background: transparent;
@include peertube-button;
}
a,
button {
color: rgba(20, 20, 20, 0.5);
&:hover:not(:disabled) {
color: rgba(20, 20, 20, 0.8);
}
}
}
.all-notifications {
border-top: 1px solid rgba(0, 0, 0, 0.1);
margin-top: -1px; // To not have 2 borders with the last notification
text-align: center;
font-weight: $font-semibold;
color: pvar(--mainForegroundColor);
padding: 0.75rem 0;
text-decoration: underline !important;
&:hover {
opacity: 0.85;
}
}
}
}
}
.notification-inbox-dropdown,
.notification-inbox-link {
cursor: pointer;
position: relative;
.unread-notifications {
@include margin-left(20px);
}
.unread-notifications {
position: absolute;
top: 6px;
left: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: pvar(--mainColor);
color: #fff;
font-size: 10px;
font-weight: $font-semibold;
border-radius: 16px;
width: 16px;
height: 16px;
line-height: 1;
@media screen and (max-width: $mobile-view) {
top: -4px;
left: -2px;
}
}
}