minor: setup sib app for dashboard component

This commit is contained in:
Jean-Baptiste Pasquier 2020-03-26 11:19:11 +01:00
parent d2c8226048
commit 7375322bfe
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
4 changed files with 19 additions and 1 deletions

View File

@ -14,6 +14,8 @@ if libLocal
script(type="module" src="/lib/sib-conversation/sib-conversation.js") script(type="module" src="/lib/sib-conversation/sib-conversation.js")
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users)) if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
script(type="module" src="/lib/sib-directory/sib-directory.js") script(type="module" src="/lib/sib-directory/sib-directory.js")
if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard)
script(type="module" src="/lib/sib-dashboard/sib-dashboard.js")
else else
script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8") script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8")
script(type="module" src="https://unpkg.com/@startinblox/core@0.9") script(type="module" src="https://unpkg.com/@startinblox/core@0.9")
@ -28,6 +30,8 @@ else
script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3") script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3")
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users)) if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3") script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3")
if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard)
script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1")
//- Stylesheets //- Stylesheets
link(rel='stylesheet', href='/styles/index.css') link(rel='stylesheet', href='/styles/index.css')

View File

@ -18,6 +18,10 @@ html(lang="en")
include menu-left.pug include menu-left.pug
div#viewport div#viewport
if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard)
#dashboard(hidden).no-sidebar
include page-dashboard.pug
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users)) if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
#members(hidden).no-sidebar #members(hidden).no-sidebar
include page-directory.pug include page-directory.pug

View File

@ -30,7 +30,12 @@ sib-widget(name='menu-fix-url-project')
) )
nav#main__menu.jsLeftMenu nav#main__menu.jsLeftMenu
sib-router#navbar-router(default-route='members') sib-router#navbar-router(default-route='dashboard')
if endpoints.dashboard || (endpoints.get && endpoints.get.dashboard)
sib-route.menu(name='dashboard')
div.menu-label Dashboard
div.menu-icon.icon-dashboard
div.divider
if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users)) if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users))
sib-route.menu(name='members') sib-route.menu(name='members')
div.menu-label Members div.menu-label Members

5
src/page-dashboard.pug Normal file
View File

@ -0,0 +1,5 @@
.views-container
h2 Dashboard
sib-dashboard(
data-src=`${endpoints.dashboard || endpoints.get.dashboard}`
)