feature: add counter on circles

This commit is contained in:
Jean-Baptiste Pasquier 2021-01-25 11:56:34 +01:00
parent b71a8de46e
commit c469606dca
2 changed files with 29 additions and 3 deletions

View File

@ -36,7 +36,7 @@ if endpoints.get
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
if endpoints.get.users
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@1.7" defer)
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@beta" defer)
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
if endpoints.get.polls

View File

@ -39,6 +39,28 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
data-trans='circle.list.buttonCreate'
)
solid-widget(name='hubl-admin-circle-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-widget(name='hubl-admin-circle-counter-alternate')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="circle.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
.segment.table-wrapper
.table
@ -66,7 +88,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
class='table-body'
bind-user
nested-field='circles'
fields='cell1(circle.name, circle.subtitle), cell2(circle.owner), cell3(leaveButton)'
fields='cell1(circle.name, counter, circle.subtitle), cell2(circle.owner), cell3(leaveButton)'
loader-id='loader-admin-circles'
class-cell1='segment table-cell third whitespace-normal'
@ -79,6 +101,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
action-leaveButton="joinButton"
widget-leaveButton="hubl-admin-circle-leave-button"
widget-circle.owner='hubl-circle-owner'
action-counter="counter"
widget-counter="hubl-admin-circle-counter-alternate"
order-by="circle.name"
)
@ -107,7 +131,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
class='table-body'
data-src=`${endpoints.circles || endpoints.get.circles}joinable/`
fields='cell1(name, subtitle), cell2(owner), cell3(members)'
fields='cell1(name, counter, subtitle), cell2(owner), cell3(members)'
loader-id='loader-admin-circles'
class-cell1='segment table-cell third whitespace-normal'
@ -119,6 +143,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
widget-owner='hubl-circle-owner'
widget-members="hubl-admin-circle-join-button"
action-counter="counter"
widget-counter="hubl-admin-circle-counter"
order-by="name"
)