fix: experimental routing directory & job board

This commit is contained in:
Jean-Baptiste Pasquier 2021-06-15 22:41:17 +02:00
parent 43eb878ae6
commit b37ed8cf5b
9 changed files with 28 additions and 28 deletions

View File

@ -509,7 +509,7 @@ Module declaration, on `config.json`:
```json
{
"type": "jobBoard",
"type": "job-board",
"parameters": {
"dataSrc": "federation://job-offers/current/",
"dataSrcExpired": "federation://job-offers/expired/",
@ -714,7 +714,7 @@ Module declaration, on `config.json`:
```json
{
"type": "profileDirectory",
"type": "directory",
"parameters": {
"dataSrc": "federation://users/",
"rangeSkills": "federation://skills/",
@ -742,17 +742,17 @@ Eg. for the Users Directory:
```json
{
"type": "profileDirectory",
"type": "directory",
"parameters": {
"dataSrc": "server://users/",
"skills": "server://skills/",
"uploads": "server://upload/"
},
"route": "directory"
"route": "profiles"
}
```
Will lead to `http://client.url/directory` as URL to reach the module instead of the default `http://client.url/profileDirectory`.
Will lead to `http://client.url/profiles` as URL to reach the module instead of the default `http://client.url/directory`.
If you provide no `route`, then Orbit will use the `type` as route view name. If two modules share the same `route`, they'll get suffixed with a random unique id.
@ -793,7 +793,7 @@ Eg.:
```json
{
"type": "profileDirectory",
"type": "directory",
"parameters": {
"dataSrc": "server://users/",
"skills": "server://skills/",

View File

@ -38,7 +38,7 @@
]
},
{
"type": "profileDirectory",
"type": "directory",
"parameters": {
"dataSrc": "federation://users/",
"rangeSkills": "federation://skills/",
@ -51,7 +51,7 @@
]
},
{
"type": "jobBoard",
"type": "job-board",
"parameters": {
"dataSrc": "federation://job-offers/current/",
"dataSrcExpired": "federation://job-offers/expired/",

View File

@ -134,7 +134,7 @@ html(lang="en")
.scrollbar-content.bg-color-white
include views/page-events.pug
if component.type == "jobBoard"
if component.type == "job-board"
orbit-reactivity(data-src=`${component.parameters.dataSrcExpired}` target-src=`${component.parameters.dataSrc}`)
orbit-reactivity(data-src=`${component.parameters.post}` target-src=`${component.parameters.dataSrc}`)
orbit-reactivity(data-src=`${component.parameters.dataSrcExpired}` target-src=`${component.parameters.post}`)
@ -146,7 +146,7 @@ html(lang="en")
.scrollbar-content
include views/page-polls.pug
if component.type == "profileDirectory"
if component.type == "directory"
orbit-reactivity(bind-user nested-field="profile" target-src="store://user")
orbit-reactivity(bind-user nested-field="account" target-src="store://user")
@ -190,11 +190,11 @@ html(lang="en")
file=component.parameters.file
)
if componentSet.has('profileDirectory')
if componentSet.has('directory')
.scrollbar-content(
id=`${getRoute("profileDirectory", true)}-profile`
id=`${getRoute("directory", true)}-profile`
hidden
data-view=`${getRoute("profileDirectory", true)}-profile`
data-view=`${getRoute("directory", true)}-profile`
no-render
)
include views/page-profile.pug

View File

@ -39,7 +39,7 @@ if componentSet.has('invoices')
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-invoicing@1.4" defer)
//- script(type="module" src="/lib/solid-invoicing/solid-invoicing.js" defer)
if componentSet.has("jobBoard")
if componentSet.has("job-board")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-job-board@6.2" defer)
//- script(type="module" src="/lib/solid-job-board/dist/index.js" defer)
@ -51,7 +51,7 @@ if componentSet.has("polls")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-poll@3.1" defer)
//- script(type="module" src="/lib/solid-poll/index.js" defer)
if componentSet.has("profileDirectory")
if componentSet.has("directory")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-directory@6.1" defer)
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer)

View File

@ -18,7 +18,7 @@ div.segment.full.padding-top-small.padding-right-large.padding-bottom-small.padd
solid-link.icon.icon-info.icon-secondary.hover(
bind-resources
next=`${getRoute('profileDirectory', true)}-member-profile`
next=`${getRoute('directory', true)}-member-profile`
)
.chat-view.segment.full.whitespace-normal

View File

@ -1,6 +1,6 @@
solid-profile(
bind-user
upload-src=`${getComponent('profileDirectory', true).parameters.uploads}`
range-skills=`${getComponent('profileDirectory', true).parameters.skills}`
uniq=`${getComponent('profileDirectory', true).uniq}`
upload-src=`${getComponent('directory', true).parameters.uploads}`
range-skills=`${getComponent('directory', true).parameters.skills}`
uniq=`${getComponent('directory', true).uniq}`
)

View File

@ -38,9 +38,9 @@ div
div.panel
nav.bg-color-white.text-semibold.text-color-heading
ul
if componentSet.has("profileDirectory")
if componentSet.has("directory")
li.border-bottom.border-color-grey
solid-link.segment.padding-small.text-hover(next=`${getRoute("profileDirectory", true)}-profile` data-trans='header.myProfile')
solid-link.segment.padding-small.text-hover(next=`${getRoute("directory", true)}-profile` data-trans='header.myProfile')
if componentSet.has("admin")
li.segment.padding-small.border-bottom.border-color-grey
div(data-trans='header.admin')
@ -89,9 +89,9 @@ div
div.panel
nav.bg-color-white.text-semibold.text-color-heading
ul
if componentSet.has("profileDirectory")
if componentSet.has("directory")
li.border-bottom.border-color-grey
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next=`${getRoute("profileDirectory", true)}-profile` data-trans='header.myProfile')
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next=`${getRoute("directory", true)}-profile` data-trans='header.myProfile')
if componentSet.has("admin")
li.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.border-bottom.border-color-grey
div(data-trans='header.admin')

View File

@ -76,9 +76,9 @@ solid-router#navbar-router(default-route=defaultRoute)
div.segment.margin-right-xxsmall.jsMenuArrow
div.segment.icon.icon-small.icon-arrow-down
div.segment.half.text-uppercase.text-letter-spacing-large(data-trans=`${component.name?component.name:"menuLeft.messages"}`)
if componentSet.has("profileDirectory")
if componentSet.has("directory")
div.menu-options.segment.jsMenuOption
solid-link.segment.block.menu-icon.icon.icon-small.icon-user-follow(next=getRoute('profileDirectory', true))
solid-link.segment.block.menu-icon.icon.icon-small.icon-user-follow(next=getRoute('directory', true))
solid-badge.badge(data-type="Message")
solid-route(name=`admin-${component.route}`, hidden)
solid-route(name=`admin-${component.route}-create` use-id='' hidden)
@ -137,14 +137,14 @@ solid-router#navbar-router(default-route=defaultRoute)
)
div.divider
if component.type == "profileDirectory"
if component.type == "directory"
solid-route.menu-tab.segment.full.padding-xsmall.text-semibold.text-color-white.heading-active.bg-color-heading.transparent-background.hover.active(name=component.route)
div.segment.margin-right-xxsmall
div.icon.icon-small.icon-people
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.profileDirectory")
solid-route.menu(name=`${component.route}-profile`, hidden)
div.divider
if component.type == "jobBoard"
if component.type == "job-board"
solid-route.menu-tab.segment.full.padding-xsmall.text-semibold.text-color-white.heading-active.bg-color-heading.transparent-background.hover.active(name=component.route, rdf-type='hd:joboffer')
div.segment.margin-right-xxsmall
div.segment.icon.icon-small.icon-briefcase

View File

@ -1,4 +1,4 @@
if componentSet.has('circles') || componentSet.has('projects') || componentSet.has('profileDirectory') || componentSet.has('chat')
if componentSet.has('circles') || componentSet.has('projects') || componentSet.has('directory') || componentSet.has('chat')
solid-widget(name='orbit-menu-empty')
template
p.segment.full.empty.whitespace-normal(style='display:block!important; color:#D0D4DA')