feature: status icon on left menu

This commit is contained in:
Jean-Baptiste Pasquier 2020-05-19 19:42:32 +02:00
parent 120af5b322
commit 7c00d2391a
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
4 changed files with 20 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import { widgetFactory } from 'https://unpkg.com/@startinblox/core@0.9/dist/widgets/widget-factory.js'; import { widgetFactory } from 'https://unpkg.com/@startinblox/core@0.9/dist/widgets/widget-factory.js';
import { importCSS } from 'https://unpkg.com/@startinblox/core@0.9/dist/libs/helpers.js';
import SlimSelect from 'https://dev.jspm.io/slim-select@1.23'; import SlimSelect from 'https://dev.jspm.io/slim-select@1.23';
const HublStatus = widgetFactory( const HublStatus = widgetFactory(

View File

@ -8,6 +8,10 @@ sib-widget(name='hubl-menu-jabberid')
data-jabberID="${value}" data-jabberID="${value}"
) )
sib-widget(name='hubl-menu-publicprivate')
template
div ${value == 'Public' ? '#' : ''}
sib-widget(name='hubl-create') sib-widget(name='hubl-create')
template template
p.create Tu ne fais partie d'aucun ${value}. p.create Tu ne fais partie d'aucun ${value}.
@ -19,8 +23,9 @@ sib-widget(name='hubl-menu-fix-url-circle')
template template
sib-display( sib-display(
data-src='${value}' data-src='${value}'
fields='name, jabberID, badge' fields='status, name, jabberID, badge'
value-badge='${value}' value-badge='${value}'
widget-status='hubl-menu-publicprivate'
widget-badge='hubl-counter' widget-badge='hubl-counter'
widget-jabberID='hubl-menu-jabberid' widget-jabberID='hubl-menu-jabberid'
widget-name='sib-display-div' widget-name='sib-display-div'
@ -30,10 +35,11 @@ sib-widget(name='hubl-menu-fix-url-project')
template template
sib-display( sib-display(
data-src='${value}' data-src='${value}'
fields='project(customer.name, name, jabberID), badge' fields='status, project(customer.name, name, jabberID), badge'
class-name='project-name' class-name='project-name'
class-customer.name='project-customer' class-customer.name='project-customer'
value-badge='${value}' value-badge='${value}'
widget-status='hubl-menu-publicprivate'
widget-jabberID='hubl-menu-jabberid' widget-jabberID='hubl-menu-jabberid'
widget-badge='hubl-counter' widget-badge='hubl-counter'
widget-name='sib-display-div' widget-name='sib-display-div'

View File

@ -154,6 +154,17 @@
} }
} }
hubl-menu-publicprivate {
display: inline-block;
text-align: center;
div {
font-family: simple-line-icons;
width: 20px;
font-size: 0.8em;
padding-top: 0.1em;
}
}
>sib-display.nosub>div>sib-display>div { >sib-display.nosub>div>sib-display>div {
padding: 1rem 1rem 1rem 3rem; padding: 1rem 1rem 1rem 3rem;
} }

View File

@ -28,7 +28,6 @@
>* { >* {
border-right: 1px solid var(--color-table-border); border-right: 1px solid var(--color-table-border);
flex: 1;
padding: 2.1rem 0; padding: 2.1rem 0;
text-align: center; text-align: center;
} }