move the notification clear button up
parent
5af50b8b8d
commit
eb15e36b3c
|
@ -11,13 +11,13 @@
|
|||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.clear {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
button {
|
||||
&:hover {
|
||||
color: $c-bad;
|
||||
}
|
||||
.delete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0.5rem;
|
||||
&:hover {
|
||||
color: $c-bad;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,32 +17,22 @@ function renderContent(ctrl: Ctrl, d: NotifyData): VNode[] {
|
|||
|
||||
const nodes: VNode[] = [];
|
||||
|
||||
if (pager.previousPage)
|
||||
nodes.push(
|
||||
h('div.pager.prev', {
|
||||
attrs: { 'data-icon': '' },
|
||||
hook: clickHook(ctrl.previousPage),
|
||||
})
|
||||
);
|
||||
else if (pager.nextPage)
|
||||
nodes.push(
|
||||
h('div.pager.prev.disabled', {
|
||||
attrs: { 'data-icon': '' },
|
||||
})
|
||||
);
|
||||
nodes.push(
|
||||
h(`div.pager.prev${pager.previousPage ? '' : '.disabled'}`, {
|
||||
attrs: { 'data-icon': '' },
|
||||
hook: clickHook(ctrl.previousPage),
|
||||
})
|
||||
);
|
||||
|
||||
if (nb > 0 && pager.currentPage == 1)
|
||||
if (nb > 0)
|
||||
nodes.push(
|
||||
h(
|
||||
'div.clear',
|
||||
h('button.delete.button.button-empty', {
|
||||
attrs: {
|
||||
'data-icon': '',
|
||||
title: 'Clear',
|
||||
},
|
||||
hook: clickHook(ctrl.clear),
|
||||
})
|
||||
)
|
||||
h('button.delete.button.button-empty', {
|
||||
attrs: {
|
||||
'data-icon': '',
|
||||
title: 'Clear',
|
||||
},
|
||||
hook: clickHook(ctrl.clear),
|
||||
})
|
||||
);
|
||||
|
||||
nodes.push(nb ? recentNotifications(d, ctrl.scrolling()) : empty());
|
||||
|
|
Loading…
Reference in New Issue