major: frontend federation
This commit is contained in:
parent
a2123f07df
commit
a5730680d0
276
README.md
276
README.md
@ -97,7 +97,8 @@ On `config.json`:
|
||||
{
|
||||
"client": {
|
||||
"name": "Localhost",
|
||||
"logo": "/images/logo.webp"
|
||||
"logo": "/images/logo.webp",
|
||||
"server": "http://server"
|
||||
},
|
||||
"components": []
|
||||
}
|
||||
@ -107,6 +108,7 @@ Where:
|
||||
|
||||
* `client.name` is the name of your Orbit
|
||||
* `client.logo` is an URL to an image file
|
||||
* `client.server` is the main data server of the client
|
||||
* `components` is your modules declaration registry
|
||||
|
||||
### Optional personalisation
|
||||
@ -226,18 +228,28 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "circles",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/circles/",
|
||||
"post": "http://server.url/circles/",
|
||||
"owners": "http://server.url/users/",
|
||||
"users": "http://server.url/users/",
|
||||
"parameters": {
|
||||
"dataSrc": "federation://circles/",
|
||||
"dataSrcJoinable": "federation://circles/joinable/",
|
||||
"owners": "federation://users/",
|
||||
"post": "server://circles/",
|
||||
"users": "federation://users/",
|
||||
"noRender": "",
|
||||
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
|
||||
}
|
||||
},
|
||||
"federation": [
|
||||
"..."
|
||||
],
|
||||
"route": "circles"
|
||||
}
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
* `dataSrc`: is a container listing every circles
|
||||
* `dataSrcJoinable`: is a container listing every public & not joined circles for the user
|
||||
* `post`: is where you create new circles
|
||||
* `noRender`: will load datas only when it'll be on screen, remove it if you encounter any issue
|
||||
* `owners`: is your users container which contains valid owners
|
||||
* `users`: is your users container
|
||||
* `xmpp` is your [Prosody](https://prosody.im/) with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/) configured on.
|
||||
@ -246,6 +258,8 @@ Where:
|
||||
|
||||
You can extend circles with other components, the same way you would add them to your modules.
|
||||
|
||||
Extensions always inherit from its parent federation.
|
||||
|
||||
Actually it support: Events, Resources & Polls.
|
||||
|
||||
Eg.:
|
||||
@ -253,23 +267,34 @@ Eg.:
|
||||
```json
|
||||
{
|
||||
"type": "circles",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/circles/",
|
||||
"post": "http://server.url/circles/",
|
||||
"owners": "http://server.url/users/",
|
||||
"users": "http://server.url/users/",
|
||||
"parameters": {
|
||||
"dataSrc": "federation://circles/",
|
||||
"dataSrcJoinable": "federation://circles/joinable/",
|
||||
"owners": "federation://users/",
|
||||
"post": "server://circles/",
|
||||
"users": "federation://users/",
|
||||
"noRender": "",
|
||||
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
|
||||
},
|
||||
"federation": [
|
||||
"..."
|
||||
],
|
||||
"route": "circles",
|
||||
"extensions": [
|
||||
{
|
||||
"type": "events",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/events/",
|
||||
"post": "http://server.url/events/",
|
||||
"typeevents": "http://server.url/typeevents/",
|
||||
"postTypeevents": "http://server.url/typeevents/",
|
||||
"uploads": "http://server.url/upload/"
|
||||
}
|
||||
"parameters": {
|
||||
"events": "federation://events/",
|
||||
"circles": "federation://circles/",
|
||||
"get": "federation://events/",
|
||||
"post": "server://events/",
|
||||
"postTypeevents": "server://typeevents/",
|
||||
"typeevents": "federation://typeevents/",
|
||||
"uploads": "server://upload/"
|
||||
},
|
||||
"federation": [
|
||||
"..."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -305,10 +330,10 @@ You can activate it by changing the route to anything else than false. Some endp
|
||||
```json
|
||||
{
|
||||
"type": "communities",
|
||||
"endpoints": {
|
||||
"get": "http://server/communities/",
|
||||
"addresses": "http://server/community-addresses/",
|
||||
"uploads": "http://server/upload/"
|
||||
"parameters": {
|
||||
"addresses": "federation://community-addresses/",
|
||||
"dataSrc": "federation://communities/",
|
||||
"uploads": "server://upload/"
|
||||
},
|
||||
"route": "communities"
|
||||
}
|
||||
@ -325,12 +350,15 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "dashboard",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/dashboards/"
|
||||
},
|
||||
"parameters": {
|
||||
"target": "default"
|
||||
}
|
||||
"dataSrc": "server://dashboards/",
|
||||
"noRender": "",
|
||||
"target": false
|
||||
},
|
||||
"route": "dashboard",
|
||||
"experimental": [
|
||||
"routing"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@ -338,6 +366,8 @@ A [sample fixture](https://git.startinblox.com/djangoldp-packages/djangoldp-dash
|
||||
|
||||
You can have multiple dashboard module, see the [related documentation](https://git.startinblox.com/components/solid-dashboard#having-multiple-dashboard).
|
||||
|
||||
You need the experimental routing enabled to have a Dashboard.
|
||||
|
||||
### Events
|
||||
|
||||
The events module includes a listing of upcoming events and the capability to create new ones.
|
||||
@ -350,19 +380,21 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "events",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/events/",
|
||||
"post": "http://server.url/events/",
|
||||
"regionevents": "http://server.url/regionevents/",
|
||||
"typeevents": "http://server.url/typeevents/",
|
||||
"postTypeevents": "http://server.url/typeevents/",
|
||||
"uploads": "http://server.url/upload/"
|
||||
}
|
||||
"parameters" : {
|
||||
"pastevents": "",
|
||||
"visiblecheckbox": "",
|
||||
"visibilityregions": ""
|
||||
}
|
||||
"parameters": {
|
||||
"events": "federation://events/",
|
||||
"circles": "federation://circles/",
|
||||
"get": "federation://events/",
|
||||
"post": "server://events/",
|
||||
"postTypeevents": "server://typeevents/",
|
||||
"typeevents": "federation://typeevents/",
|
||||
"pastevents": "visible",
|
||||
"visiblecheckbox": "visible",
|
||||
"visibilityregions": "visible",
|
||||
"uploads": "server://upload/"
|
||||
},
|
||||
"federation": [
|
||||
"..."
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@ -454,8 +486,8 @@ Module declaration, on `config.json`:
|
||||
"extensions": [
|
||||
{
|
||||
"type": "invoices",
|
||||
"endpoints": {
|
||||
"uploads": "http://server.url/upload/"
|
||||
"parameters": {
|
||||
"uploads": "server://upload/"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -478,14 +510,18 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "jobBoard",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/job-offers/",
|
||||
"post": "http://server.url/job-offers/",
|
||||
"skills": "http://server.url/skills/"
|
||||
},
|
||||
"parameters": {
|
||||
"dataSrc": "federation://job-offers/current/",
|
||||
"dataSrcExpired": "federation://job-offers/expired/",
|
||||
"postDataSrc": "server://job-offers/",
|
||||
"noRender": "",
|
||||
"rangeSkills": "federation://skills/",
|
||||
"fields": "earnBusinessProviding"
|
||||
}
|
||||
},
|
||||
"route": "job-offers",
|
||||
"experimental": [
|
||||
"routing"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@ -493,6 +529,8 @@ Where:
|
||||
|
||||
* `parameters.fields`: Optional set of custom fields. Notice that only `earnBusinessProviding` is already handled on djangoldp-joboffer.
|
||||
|
||||
You need the experimental routing enabled to have a Job Board.
|
||||
|
||||
### Notifications
|
||||
|
||||
The notification module adds a bell with user's notification list and a badge on each menus with how much notifications are related to this resource. You'll need:
|
||||
@ -521,7 +559,8 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "chat",
|
||||
"endpoints": {
|
||||
"parameters": {
|
||||
"noRender": "",
|
||||
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
|
||||
}
|
||||
}
|
||||
@ -542,14 +581,12 @@ On `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "polls",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/polls/",
|
||||
"parameters": {
|
||||
"dataSrc": "http://server.url/polls/",
|
||||
"post": "http://server.url/polls/",
|
||||
"pollRangeTags": "http://server.url/tags/",
|
||||
"pollRangeCircles": "http://server.url/circles/",
|
||||
"uploads": "http://server.url/upload/"
|
||||
},
|
||||
"parameters": {
|
||||
"uploads": "http://server.url/upload/",
|
||||
"displayStartEndDates": false
|
||||
}
|
||||
}
|
||||
@ -574,12 +611,17 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "projects",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/projects/",
|
||||
"post": "http://server.url/projects/",
|
||||
"captains": "http://server.url/users/",
|
||||
"parameters": {
|
||||
"captains": "federation://users/",
|
||||
"circles": "federation://circles/",
|
||||
"dataSrc": "federation://projects/",
|
||||
"dataSrcJoinable": "federation://projects/joinable/",
|
||||
"post": "server://projects/",
|
||||
"users": "federation://users/",
|
||||
"noRender": "",
|
||||
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
|
||||
}
|
||||
},
|
||||
"route": "projects"
|
||||
}
|
||||
```
|
||||
|
||||
@ -600,8 +642,8 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "resources",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/resources/",
|
||||
"parameters": {
|
||||
"dataSrc": "http://server.url/resources/",
|
||||
"post": "http://server.url/resources/",
|
||||
"types": "http://server.url/types/",
|
||||
"keywords": "http://server.url/keywords/",
|
||||
@ -629,11 +671,9 @@ Module declaration, on `config.json`:
|
||||
{
|
||||
"type": "registering",
|
||||
"parameters": {
|
||||
"dataSrc": "server://open-communities/",
|
||||
"authority": "http://server.url/",
|
||||
"authorityName": "your-authority-indentifier"
|
||||
},
|
||||
"endpoints": {
|
||||
"get": "http://server.url/open-communities/"
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -675,14 +715,25 @@ Module declaration, on `config.json`:
|
||||
```json
|
||||
{
|
||||
"type": "profileDirectory",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/users/",
|
||||
"skills": "http://server.url/skills/",
|
||||
"uploads": "http://server.url/upload/"
|
||||
}
|
||||
"parameters": {
|
||||
"dataSrc": "federation://users/",
|
||||
"rangeSkills": "federation://skills/",
|
||||
"noRender": "",
|
||||
"paginateBy": "30",
|
||||
"uploads": "server://upload/"
|
||||
},
|
||||
"federation": [
|
||||
"..."
|
||||
],
|
||||
"route": "members",
|
||||
"experimental": [
|
||||
"routing"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
You need the experimental routing enabled to have a Profile Directory.
|
||||
|
||||
### Route generation
|
||||
|
||||
Orbit will, by default, generate an unique route for every of your module. You can customize this route by setting a `route` attribute on your module declaration.
|
||||
@ -692,10 +743,10 @@ Eg. for the Users Directory:
|
||||
```json
|
||||
{
|
||||
"type": "profileDirectory",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/users/",
|
||||
"skills": "http://server.url/skills/",
|
||||
"uploads": "http://server.url/upload/"
|
||||
"parameters": {
|
||||
"dataSrc": "server://users/",
|
||||
"skills": "server://skills/",
|
||||
"uploads": "server://upload/"
|
||||
},
|
||||
"route": "directory"
|
||||
}
|
||||
@ -709,6 +760,29 @@ Some module don't need any route to be active, set `route` to `false` so.
|
||||
|
||||
Components can get the route of a module with `window.orbit.getRoute('componentName')`.
|
||||
|
||||
#### Experimental routing
|
||||
|
||||
This experimental setting allow to create a view containing a `solid-*` with every parameters provided without any code.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "display",
|
||||
"parameters": {
|
||||
"dataSrc": "server://users/",
|
||||
"fields": "name"
|
||||
},
|
||||
"experimental": [
|
||||
"routing"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
will provide a view with:
|
||||
|
||||
```html
|
||||
<solid-display data-src="http://server/users/" fields="name"></solid-display>
|
||||
```
|
||||
|
||||
#### Change the default route
|
||||
|
||||
By default, Orbit will take a Dashboard as a default route.
|
||||
@ -720,10 +794,10 @@ Eg.:
|
||||
```json
|
||||
{
|
||||
"type": "profileDirectory",
|
||||
"endpoints": {
|
||||
"get": "http://server.url/users/",
|
||||
"skills": "http://server.url/skills/",
|
||||
"uploads": "http://server.url/upload/"
|
||||
"parameters": {
|
||||
"dataSrc": "server://users/",
|
||||
"skills": "server://skills/",
|
||||
"uploads": "server://upload/"
|
||||
},
|
||||
"route": "directory",
|
||||
"defaultRoute": true
|
||||
@ -732,6 +806,52 @@ Eg.:
|
||||
|
||||
If there is more than one component with this parameter, it'll be ignored.
|
||||
|
||||
### Federation generation
|
||||
|
||||
Any parameter of your config.json can take benefits from the source generation:
|
||||
|
||||
`server://` will be replaced by the value of `client.server`:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "awesome",
|
||||
"parameters": {
|
||||
"dataSrc": "server://users/"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`federation://` will generate a virtual federated container linking:
|
||||
|
||||
* `client.server`
|
||||
* `client.servers`
|
||||
* `component.federation`
|
||||
* `extension.federation`, if on an extension
|
||||
|
||||
```json
|
||||
{
|
||||
"client": {
|
||||
"server": "http://serverA",
|
||||
"servers": [
|
||||
"http://serverB"
|
||||
]
|
||||
},
|
||||
"components": [
|
||||
{
|
||||
"type": "awesome",
|
||||
"parameters": {
|
||||
"dataSrc": "federation://users/"
|
||||
},
|
||||
"federation": [
|
||||
"http://serverC"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Will result on a virtual federated container containing `http://serverA/users/`, `http://serverB/users/` and `http://serverC/users/` on data-src.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Circles or Projects are missing the @user list
|
||||
|
1513
package-lock.json
generated
1513
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -56,8 +56,14 @@
|
||||
],
|
||||
"clearDist": false
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@startinblox/orbit-styling-framework": "^1.9.9",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"cross-env": "^7.0.3",
|
||||
"fs-extra": "^10.0.0",
|
||||
"normalize.css": "^8.0.1",
|
||||
|
@ -1,8 +0,0 @@
|
||||
if (typeof Sentry !== 'undefined') {
|
||||
Sentry.init({
|
||||
dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
|
||||
integrations: [new Sentry.Integrations.BrowserTracing()],
|
||||
environment: document.location.hostname,
|
||||
tracesSampleRate: 0.2,
|
||||
});
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
//- Automatically import every scripts
|
||||
import './libs/**/*.js';
|
||||
import './scripts/**/*.js';
|
@ -25,11 +25,8 @@ html(lang="en")
|
||||
|
||||
script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer)
|
||||
|
||||
include orbit-router.pug
|
||||
include orbit-unify.pug
|
||||
include orbit-envoy.pug
|
||||
|
||||
script(type="module" src="/components/getRoute.js" defer)
|
||||
script(type="module" src="/components/sentry.js" defer)
|
||||
script(type="module" src="/components/orbit-auto-login.js" defer)
|
||||
script(type="module" src="/components/orbit-reactivity.js" defer)
|
||||
script(type="module" src="/components/sw-toolbox.js" defer)
|
||||
@ -88,7 +85,27 @@ html(lang="en")
|
||||
id=component.route
|
||||
data-view=component.route
|
||||
hidden
|
||||
)&attributes({"no-render": component.noRender})
|
||||
)
|
||||
|
||||
//- Experimental routing
|
||||
Codeless component loading
|
||||
Eg.:
|
||||
```
|
||||
{
|
||||
"type": "awesome",
|
||||
"parameters": {
|
||||
"dataSrc": "server://some-model/"
|
||||
},
|
||||
"experimental": [
|
||||
"routing"
|
||||
]
|
||||
}
|
||||
```
|
||||
will generate a view vith a <solid-awesome data-src="http://server/some-model/"></solid-awesome>
|
||||
if component.experimental
|
||||
if component.experimental.includes('routing')
|
||||
.scrollbar-content.whitespace-normal.padding-top-xlarge.padding-right-xsmall.padding-bottom-xlarge.padding-left-xsmall.sm-padding-top-medium
|
||||
#{"solid-"+component.type}&attributes(component.attributes)
|
||||
|
||||
if component.type == "about"
|
||||
include views/page-about.pug
|
||||
@ -102,66 +119,52 @@ html(lang="en")
|
||||
.with-sidebar.whitespace-normal.jsMobileContentSidebarControl
|
||||
orbit-reactivity(bind-user nested-field='inbox' target-src="store://user.circles")
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src="store://user")
|
||||
orbit-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.post}` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.post}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.post}joinable/`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.get}joinable/`)
|
||||
orbit-reactivity(data-src=`${component.parameters.dataSrcJoinable}` target-src=`${component.parameters.dataSrc}`)
|
||||
orbit-reactivity(data-src=`${component.parameters.post}` target-src=`${component.parameters.dataSrc}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.parameters.post}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.parameters.dataSrcJoinable}`)
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src=`${component.parameters.dataSrc}`)
|
||||
include views/page-circle.pug
|
||||
|
||||
if component.type == "communities"
|
||||
.scrollbar-content.whitespace-normal
|
||||
include views/page-communities.pug
|
||||
|
||||
if component.type == "dashboard"
|
||||
.scrollbar-content
|
||||
include views/page-dashboard.pug
|
||||
|
||||
if component.type == "events"
|
||||
.scrollbar-content.bg-color-white
|
||||
include views/page-events.pug
|
||||
|
||||
if component.type == "jobBoard"
|
||||
.scrollbar-content
|
||||
orbit-reactivity(data-src=`${component.endpoints.post}current/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.post}expired/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.post}` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.get}current/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.get}current/` target-src=`${component.endpoints.get}expired/`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.get}expired/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="joboffers" target-src=`${component.endpoints.get}expired/`)
|
||||
orbit-reactivity(bind-user nested-field="joboffers" target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="joboffers" target-src=`${component.endpoints.get}current/`)
|
||||
include views/page-job-board.pug
|
||||
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}`)
|
||||
orbit-reactivity(bind-user nested-field="joboffers" target-src=`${component.parameters.dataSrc}`)
|
||||
orbit-reactivity(bind-user nested-field="joboffers" target-src=`${component.parameters.dataSrcExpired}`)
|
||||
orbit-reactivity(bind-user nested-field="joboffers" target-src=`${component.parameters.post}`)
|
||||
|
||||
if component.type == "polls"
|
||||
.scrollbar-content
|
||||
include views/page-polls.pug
|
||||
|
||||
if component.type == "profileDirectory"
|
||||
orbit-reactivity(bind-user nested-field="profile" target-src="store://user")
|
||||
orbit-reactivity(bind-user nested-field="account" target-src="store://user")
|
||||
|
||||
if component.type == "projects"
|
||||
.with-sidebar.whitespace-normal.jsMobileContentSidebarControl
|
||||
orbit-reactivity(bind-user nested-field='inbox' target-src="store://user.projects")
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src="store://user")
|
||||
orbit-reactivity(data-src=`${component.endpoints.post}joinable/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.post}` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.post}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.post}joinable/`)
|
||||
orbit-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.get}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.get}joinable/`)
|
||||
orbit-reactivity(data-src=`${component.parameters.dataSrcJoinable}` target-src=`${component.parameters.dataSrc}`)
|
||||
orbit-reactivity(data-src=`${component.parameters.dataSrcJoinable}` target-src=`${component.parameters.post}`)
|
||||
orbit-reactivity(data-src=`${component.parameters.post}` target-src=`${component.parameters.dataSrc}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.parameters.post}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.parameters.dataSrcJoinable}`)
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src=`${component.parameters.dataSrc}`)
|
||||
include views/page-project.pug
|
||||
|
||||
if component.type == "resources"
|
||||
.scrollbar-content.bg-color-white
|
||||
include views/page-resources.pug
|
||||
|
||||
if component.type == "profileDirectory"
|
||||
.scrollbar-content
|
||||
orbit-reactivity(bind-user nested-field="profile" target-src="store://user")
|
||||
orbit-reactivity(bind-user nested-field="account" target-src="store://user")
|
||||
include views/page-directory.pug
|
||||
else
|
||||
//- Components declaration without any route (`route`="false") but that need some code declaration
|
||||
|
||||
|
11
src/libs/sentry.js
Normal file
11
src/libs/sentry.js
Normal file
@ -0,0 +1,11 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
if (typeof Sentry !== 'undefined') {
|
||||
Sentry.init({
|
||||
dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
|
||||
integrations: [new Sentry.Integrations.BrowserTracing()],
|
||||
environment: document.location.hostname,
|
||||
tracesSampleRate: 0.2,
|
||||
});
|
||||
window.orbit.sentry = Sentry;
|
||||
}
|
||||
});
|
198
src/orbit-envoy.pug
Normal file
198
src/orbit-envoy.pug
Normal file
@ -0,0 +1,198 @@
|
||||
//-
|
||||
Orbit Envoy - Collision-free route generation & federation management for latter usage
|
||||
|
||||
Create a window.orbit.components, accessible by all components with the route declaration.
|
||||
Components can also get benefits from the `getRoute` function
|
||||
Eg.
|
||||
```
|
||||
window.orbit.getRoute('chat', true)
|
||||
window.orbit.getRoute('ffb39ad020645') // Where uxnzsa is the uniq of the component
|
||||
```
|
||||
will return the route of the first chat component, if exists, or triggers an error.
|
||||
|
||||
|
||||
Okay. This file really needs a cleanup now... Emergency, have to release for Friday...
|
||||
-
|
||||
let routes = new Set();
|
||||
const getRoute = (type, returnFirst = false) => {
|
||||
let availables = components.filter(c => c.type == type || c.uniq == type);
|
||||
components.forEach(c => {
|
||||
if (c.extensions) {
|
||||
c.extensions.forEach(e => {
|
||||
if (e.type == type || e.uniq == type) {
|
||||
availables.push(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (availables.length > 1) {
|
||||
if (returnFirst) {
|
||||
return availables[0].route;
|
||||
} else {
|
||||
return availables[availables.length - 1].route;
|
||||
}
|
||||
} else if (availables.length < 1) {
|
||||
console.error(`No component found for route ${type}`);
|
||||
} else {
|
||||
return availables[0].route;
|
||||
}
|
||||
}
|
||||
const getComponent = (type, returnFirst = false) => {
|
||||
let availables = components.filter(c=>c.type==type);
|
||||
if(availables.length > 1) {
|
||||
if(returnFirst) {
|
||||
return availables[0];
|
||||
} else {
|
||||
console.error(`Too much components availables for type ${type}`);
|
||||
}
|
||||
} else if(availables.length < 1) {
|
||||
console.error(`No component found for type ${type}`);
|
||||
} else {
|
||||
return availables[0];
|
||||
}
|
||||
}
|
||||
const generateUrl = (federation, path) => {
|
||||
let result = [];
|
||||
for(let target of federation) {
|
||||
result.push({
|
||||
"@id": target + path.replace(/federation:\//, ''),
|
||||
"@type": "sib:federatedContainer"
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var federations = {};
|
||||
let federationRegistering = "";
|
||||
|
||||
for component of components
|
||||
-
|
||||
if(typeof component.route === 'undefined') {
|
||||
component.route = component.type;
|
||||
}
|
||||
component.uniq = Math.random().toString(16).slice(2);
|
||||
if(component.route) {
|
||||
let route = component.route;
|
||||
if (routes.has(component.route)) {
|
||||
route += "-" + component.uniq;
|
||||
}
|
||||
routes.add(route);
|
||||
component.route = route;
|
||||
}
|
||||
if(component.extensions) {
|
||||
for(extension of component.extensions) {
|
||||
if(typeof extension.route === 'undefined') {
|
||||
extension.route = extension.type;
|
||||
}
|
||||
extension.uniq = Math.random().toString(16).slice(2);
|
||||
if(extension.route) {
|
||||
let route = extension.route;
|
||||
if (routes.has(extension.route)) {
|
||||
route += "-" + extension.uniq;
|
||||
}
|
||||
routes.add(route);
|
||||
extension.route = route;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(component.parameters) {
|
||||
let federation = new Set();
|
||||
if(client.server) {
|
||||
federation.add(client.server);
|
||||
}
|
||||
if(client.servers) {
|
||||
for(server of client.servers) {
|
||||
federation.add(server);
|
||||
}
|
||||
}
|
||||
if(component.federation) {
|
||||
for(target of component.federation) {
|
||||
federation.add(target);
|
||||
}
|
||||
}
|
||||
component.federation = [...federation];
|
||||
for(const [attribute, path] of Object.entries(component.parameters)) {
|
||||
if(typeof path === 'string') {
|
||||
if(path.startsWith('federation://')) {
|
||||
federations[`store://local.${component.uniq}/${attribute}/`] = {
|
||||
"@context": "https://cdn.happy-dev.fr/owl/hdcontext.jsonld",
|
||||
"@type": "ldp:Container",
|
||||
"@id": `store://local.${component.uniq}/${attribute}/`,
|
||||
"ldp:contains": generateUrl(federation, path),
|
||||
"permissions": [{"mode": {"@type": "view"}}]
|
||||
};
|
||||
component.parameters[attribute] = `store://local.${component.uniq}/${attribute}/`;
|
||||
}
|
||||
if(path.startsWith('server://')) {
|
||||
component.parameters[attribute] = client.server + path.replace(/server:\//, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Rewrite every parameters to kebab-case */
|
||||
let rewriteParameters = {};
|
||||
for(const [attribute, value] of Object.entries(component.parameters)) {
|
||||
rewriteParameters[attribute.replace(/((?<=[a-z\d])[A-Z]|(?<=[A-Z\d])[A-Z](?=[a-z]))/g, '-$1').toLowerCase()] = value;
|
||||
}
|
||||
component.attributes = rewriteParameters;
|
||||
component.attributes.route = component.route;
|
||||
component.attributes.uniq = component.uniq;
|
||||
}
|
||||
if(component.extensions) {
|
||||
for(extension of component.extensions) {
|
||||
if(extension.parameters) {
|
||||
let federation = new Set();
|
||||
if(client.server) {
|
||||
federation.add(client.server);
|
||||
}
|
||||
if(client.servers) {
|
||||
for(server of client.servers) {
|
||||
federation.add(server);
|
||||
}
|
||||
}
|
||||
if(component.federation) {
|
||||
for(target of component.federation) {
|
||||
federation.add(target);
|
||||
}
|
||||
}
|
||||
if(extension.federation) {
|
||||
for(target of extension.federation) {
|
||||
federation.add(target);
|
||||
}
|
||||
}
|
||||
extension.federation = [...federation];
|
||||
for(const [attribute, path] of Object.entries(extension.parameters)) {
|
||||
if(typeof path === 'string') {
|
||||
if(path.startsWith('federation://')) {
|
||||
federations[`store://local.${extension.uniq}/${attribute}/`] = {
|
||||
"@context": "https://cdn.happy-dev.fr/owl/hdcontext.jsonld",
|
||||
"@type": "ldp:Container",
|
||||
"@id": `store://local.${extension.uniq}/${attribute}/`,
|
||||
"ldp:contains": generateUrl(federation, path),
|
||||
"permissions": [{"mode": {"@type": "view"}}]
|
||||
};
|
||||
extension.parameters[attribute] = `store://local.${extension.uniq}/${attribute}/`;
|
||||
}
|
||||
if(path.startsWith('server://')) {
|
||||
extension.parameters[attribute] = client.server + path.replace(/server:\//, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Rewrite every parameters to kebab-case */
|
||||
let rewriteParameters = {};
|
||||
for(const [attribute, value] of Object.entries(extension.parameters)) {
|
||||
rewriteParameters[attribute.replace(/((?<=[a-z\d])[A-Z]|(?<=[A-Z\d])[A-Z](?=[a-z]))/g, '-$1').toLowerCase()] = value;
|
||||
}
|
||||
extension.attributes = rewriteParameters;
|
||||
extension.attributes.uniq = extension.uniq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
const defaultComponent = components.filter(e=>e.defaultRoute != undefined);
|
||||
let defaultRoute = "dashboard";
|
||||
if(defaultComponent.length == 1) {
|
||||
defaultRoute = defaultComponent[0].uniq;
|
||||
}
|
||||
|
||||
- const orbitComponents = `window.orbit={};window.orbit.components = ${JSON.stringify(components)};window.orbit.federations = ${JSON.stringify(federations)};window.orbit.defaultRoute = "${defaultRoute}";window.orbit.client = ${JSON.stringify(client)};window.hubl = window.orbit;`;
|
||||
script!=orbitComponents
|
@ -1,89 +0,0 @@
|
||||
//-
|
||||
Orbit router declaration for latter generation
|
||||
Create a window.orbit.components, accessible by all components with the route declaration.
|
||||
Components can also get benefits from the `getRoute` function
|
||||
Eg.
|
||||
```
|
||||
window.orbit.getRoute('chat', true)
|
||||
window.orbit.getRoute('uxnzsa') // Where uxnzsa is the uniq of the component
|
||||
```
|
||||
will return the route of the first chat component, if exists, or triggers an error.
|
||||
-
|
||||
let routes = new Set();
|
||||
const getRoute = (type, returnFirst = false) => {
|
||||
let availables = components.filter(c => c.type == type || c.uniq == type);
|
||||
components.forEach(c => {
|
||||
if (c.extensions) {
|
||||
c.extensions.forEach(e => {
|
||||
if (e.type == type || e.uniq == type) {
|
||||
availables.push(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (availables.length > 1) {
|
||||
if (returnFirst) {
|
||||
return availables[0].route;
|
||||
} else {
|
||||
return availables[availables.length - 1].route;
|
||||
}
|
||||
} else if (availables.length < 1) {
|
||||
console.error(`No component found for route ${type}`);
|
||||
} else {
|
||||
return availables[0].route;
|
||||
}
|
||||
}
|
||||
const getComponent = (type, returnFirst = false) => {
|
||||
let availables = components.filter(c=>c.type==type);
|
||||
if(availables.length > 1) {
|
||||
if(returnFirst) {
|
||||
return availables[0];
|
||||
} else {
|
||||
console.error(`Too much components availables for type ${type}`);
|
||||
}
|
||||
} else if(availables.length < 1) {
|
||||
console.error(`No component found for type ${type}`);
|
||||
} else {
|
||||
return availables[0];
|
||||
}
|
||||
}
|
||||
|
||||
for component of components
|
||||
-
|
||||
if(typeof component.route === 'undefined') {
|
||||
component.route = component.type;
|
||||
}
|
||||
if(component.route) {
|
||||
component.uniq = Math.random().toString(16).slice(2);
|
||||
let route = component.route;
|
||||
if (routes.has(component.route)) {
|
||||
route += "-" + component.uniq;
|
||||
}
|
||||
routes.add(route);
|
||||
component.route = route;
|
||||
}
|
||||
if(component.extensions)
|
||||
for extension of component.extensions
|
||||
-
|
||||
if(typeof extension.route === 'undefined') {
|
||||
extension.route = extension.type;
|
||||
}
|
||||
if(extension.route) {
|
||||
extension.uniq = Math.random().toString(16).slice(2);
|
||||
let route = extension.route;
|
||||
if (routes.has(extension.route)) {
|
||||
route += "-" + extension.uniq;
|
||||
}
|
||||
routes.add(route);
|
||||
extension.route = route;
|
||||
}
|
||||
|
||||
-
|
||||
const defaultComponent = components.filter(e=>e.defaultRoute != undefined);
|
||||
let defaultRoute = "dashboard";
|
||||
if(defaultComponent.length == 1) {
|
||||
defaultRoute = defaultComponent[0].uniq;
|
||||
}
|
||||
|
||||
- const orbitComponents = `window.orbit={};window.orbit.components = ${JSON.stringify(components)};window.orbit.defaultRoute = "${defaultRoute}";window.orbit.client = ${JSON.stringify(client)};window.hubl = window.orbit;`;
|
||||
script!=orbitComponents
|
7
src/scripts/federationRegistering.js
Normal file
7
src/scripts/federationRegistering.js
Normal file
@ -0,0 +1,7 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
for(const [uniq, federation] of Object.entries(window.orbit.federations)) {
|
||||
if (sibStore && "setLocalData" in sibStore) {
|
||||
sibStore.setLocalData(federation, uniq);
|
||||
}
|
||||
}
|
||||
});
|
@ -1,5 +0,0 @@
|
||||
div.padding-top-xlarge.padding-right-xsmall.padding-bottom-xlarge.padding-left-xsmall.sm-padding-top-medium.bg-color-grey.whitespace-normal
|
||||
solid-dashboard(
|
||||
data-src=component.endpoints.get
|
||||
uniq=component.uniq
|
||||
)&attributes({target:component.parameters ? component.parameters.target : false})
|
@ -1,7 +0,0 @@
|
||||
div.bg-color-grey.padding-top-xlarge.padding-right-small.padding-bottom-xlarge.padding-left-small.whitespace-normal
|
||||
solid-directory(
|
||||
data-src=`${component.endpoints.get}`
|
||||
range-skills=`${component.endpoints.skills}`
|
||||
uniq=component.uniq
|
||||
paginate-by="30"
|
||||
)
|
@ -1,12 +1,11 @@
|
||||
div.whitespace-normal
|
||||
solid-event(
|
||||
data-src=`${component.endpoints.events}`
|
||||
past-events=`${component.parameters ? component.parameters.pastevents : "hidden"}`
|
||||
visiblecheckbox=`${component.parameters ? component.parameters.visiblecheckbox : "hidden"}`
|
||||
visibilityregions=`${component.parameters ? component.parameters.visibilityregions : "hidden"}`
|
||||
range-event-region=`${component.endpoints.regionevents}`
|
||||
range-event-type=`${component.endpoints.typeevents}`
|
||||
range-event-circle=`${getComponent('circles').endpoints.get}/`
|
||||
upload-dir=`${component.endpoints.uploads}`
|
||||
id-prefix='default'
|
||||
)
|
||||
solid-event(
|
||||
data-src=`${component.parameters.events}`
|
||||
past-events=`${component.parameters.pastevents || "hidden"}`
|
||||
visiblecheckbox=`${component.parameters.visiblecheckbox || "hidden"}`
|
||||
visibilityregions=`${component.parameters.visibilityregions || "hidden"}`
|
||||
range-event-region=`${component.parameters.regionevents}`
|
||||
range-event-type=`${component.parameters.typeevents}`
|
||||
range-event-circle=`${component.parameters.circles}`
|
||||
upload-dir=`${component.parameters.uploads}`
|
||||
id-prefix='default'
|
||||
)
|
||||
|
@ -1,8 +0,0 @@
|
||||
solid-job-board(
|
||||
data-src=`${component.endpoints.get}`
|
||||
post-data-src=`${component.endpoints.post}`
|
||||
range-skills=`${component.endpoints.skills}`
|
||||
uniq=component.uniq
|
||||
)&attributes({
|
||||
"fields": component.parameters ? component.parameters.fields : false
|
||||
})
|
@ -25,7 +25,7 @@ div.segment.full.padding-top-small.padding-right-large.padding-bottom-small.padd
|
||||
solid-xmpp-chat(
|
||||
data-authentication='login'
|
||||
data-auto-login='true'
|
||||
data-websocket-url=component.endpoints.xmpp
|
||||
data-websocket-url=component.parameters.xmpp
|
||||
bind-resources
|
||||
uniq=component.uniq
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
solid-poll(
|
||||
data-src=component.endpoints.get
|
||||
data-dest=component.endpoints.post
|
||||
range-tags=component.endpoints.pollRangeTags
|
||||
range-circles=component.endpoints.pollRangeCircles
|
||||
upload-dir=component.endpoints.uploads
|
||||
data-src=component.parameters.dataSrc
|
||||
data-dest=component.parameters.post
|
||||
range-tags=component.parameters.pollRangeTags
|
||||
range-circles=component.parameters.pollRangeCircles
|
||||
upload-dir=component.parameters.uploads
|
||||
uniq=component.uniq
|
||||
)&attributes({
|
||||
"display-start-end-dates": component.parameters ? component.parameters.displayStartEndDates : false
|
||||
|
@ -1,6 +1,6 @@
|
||||
solid-profile(
|
||||
bind-user
|
||||
upload-src=`${getComponent('profileDirectory', true).endpoints.uploads}`
|
||||
range-skills=`${getComponent('profileDirectory', true).endpoints.skills}`
|
||||
upload-src=`${getComponent('profileDirectory', true).parameters.uploads}`
|
||||
range-skills=`${getComponent('profileDirectory', true).parameters.skills}`
|
||||
uniq=`${getComponent('profileDirectory', true).uniq}`
|
||||
)
|
||||
|
@ -28,14 +28,14 @@
|
||||
widget-logo='orbit-index-community-logo'
|
||||
widget-name='orbit-index-community-text'
|
||||
)
|
||||
if getComponent('registering').endpoints.get
|
||||
if getComponent('registering').parameters.dataSrc
|
||||
div.loader#orbit-index-community-selector-loader
|
||||
div
|
||||
div
|
||||
div
|
||||
div
|
||||
solid-display.community-flex-container(
|
||||
data-src=`${getComponent('registering').endpoints.get}`
|
||||
data-src=`${getComponent('registering').parameters.dataSrc}`
|
||||
fields='action'
|
||||
action-action='action'
|
||||
widget-action='orbit-index-select-community'
|
||||
|
@ -1,14 +1,14 @@
|
||||
div.whitespace-normal
|
||||
solid-resource(data-src=`${component.endpoints.get}`
|
||||
post-data-src=`${component.endpoints.post}`
|
||||
range-resource-type=`${component.endpoints.types}`
|
||||
post-data-type-src=`${component.endpoints.postTypes}`
|
||||
range-resource-keyword=`${component.endpoints.keywords}`
|
||||
post-data-keyword-src=`${component.endpoints.postKeywords}`
|
||||
circles=`${component.endpoints.circles}/`
|
||||
solid-resource(data-src=`${component.parameters.dataSrc}`
|
||||
post-data-src=`${component.parameters.post}`
|
||||
range-resource-type=`${component.parameters.types}`
|
||||
post-data-type-src=`${component.parameters.postTypes}`
|
||||
range-resource-keyword=`${component.parameters.keywords}`
|
||||
post-data-keyword-src=`${component.parameters.postKeywords}`
|
||||
circles=`${component.parameters.circles}`
|
||||
associated-circle-label=""
|
||||
data-trans=`associated-circle-label=${component.parameters && component.parameters.associatedName ? component.parameters.associatedName : 'circle.extensions.associated'}`
|
||||
upload-dir=`${component.endpoints.uploads}`
|
||||
upload-dir=`${component.parameters.uploads}`
|
||||
id-prefix='default'
|
||||
uniq=component.uniq
|
||||
)
|
||||
|
@ -14,7 +14,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
||||
div
|
||||
|
||||
solid-form.form(
|
||||
data-src=`${getComponent('circles').endpoints.post}`
|
||||
data-src=`${getComponent('circles').parameters.post}`
|
||||
|
||||
fields='status, community.community, name, subtitle, description, help'
|
||||
required-status
|
||||
|
@ -13,10 +13,9 @@ solid-widget(name=`orbit-admin-circle-join-button`)
|
||||
class-submit-button="add-member-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-arrow-right-circle children-icon-small children-icon-margin-right-xsmall"
|
||||
data-trans='submit-button=circle.list.buttonJoin'
|
||||
)
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.dataSrc}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.dataSrcJoinable}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.post}` target-src='${value}')
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src='${value}')
|
||||
|
||||
include page-admin-circles.pug
|
||||
@ -24,7 +23,7 @@ include page-admin-circles.pug
|
||||
div.segment.full.padding-small.padding-top-xsmall.sm-padding-xsmall.whitespace-normal
|
||||
solid-display(
|
||||
class='segment full children children-quarter sm-children-full children-margin-bottom-medium sm-children-margin-bottom-xsmall children-padding-right-xsmall children-padding-left-xsmall sm-children-padding-none sm-whitespace-normal masonry pagination'
|
||||
data-src=`${getComponent('circles').endpoints.get}joinable/`
|
||||
data-src=`${getComponent('circles').parameters.dataSrcJoinable}`
|
||||
fields='segment1(segment2(community.community.logo), segment3(name, subtitle, counter, members))'
|
||||
filtered-by=`admin-circle-filter-${page}`
|
||||
order-by='name'
|
||||
|
@ -1,9 +1,8 @@
|
||||
solid-widget(name=`leave-circle-reactivity`)
|
||||
template
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.dataSrc}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.dataSrcJoinable}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.post}` target-src='${value}')
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src='${value}')
|
||||
|
||||
solid-widget(name=`orbit-admin-circle-leave-button`)
|
||||
@ -14,10 +13,9 @@ solid-widget(name=`orbit-admin-circle-leave-button`)
|
||||
data-label=''
|
||||
data-trans='data-label=circle.list.buttonQuit'
|
||||
)
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.dataSrc}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.dataSrcJoinable}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('circles').parameters.post}` target-src='${src}')
|
||||
orbit-reactivity(bind-user nested-field="circles" target-src='${src}')
|
||||
solid-display(
|
||||
data-src="${src}"
|
||||
|
@ -16,7 +16,7 @@ div.segment.full.padding-large.padding-top-medium.padding-bottom-xsmall.sm-paddi
|
||||
div.segment.half.sm-full
|
||||
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='circle.list.subTitle')
|
||||
div.segment.half.sm-full.text-right
|
||||
solid-ac-checker(data-src=`${getComponent('circles').endpoints.post}`, permission='acl:Append')
|
||||
solid-ac-checker(data-src=`${getComponent('circles').parameters.post}`, permission='acl:Append')
|
||||
solid-link(
|
||||
class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-margin-right-xsmall icon-plus'
|
||||
next=`admin-${getRoute('circles', true)}-create`
|
||||
@ -43,7 +43,7 @@ div.segment.full.padding-large.padding-top-medium.padding-bottom-xsmall.sm-paddi
|
||||
span(data-trans='circle.list.tabJoin')
|
||||
solid-display(
|
||||
class="margin-left-xxsmall"
|
||||
data-src=`${getComponent('circles').endpoints.get}joinable/`
|
||||
data-src=`${getComponent('circles').parameters.dataSrcJoinable}`
|
||||
fields=""
|
||||
counter-template="(${counter})"
|
||||
filtered-by=`admin-circle-filter-${page}`
|
||||
|
@ -14,9 +14,9 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
||||
div
|
||||
|
||||
solid-form.form(
|
||||
data-src=`${getComponent('projects').endpoints.post}`
|
||||
data-src=`${getComponent('projects').parameters.post}`
|
||||
|
||||
range-captain=`${getComponent('projects').endpoints.captains}`
|
||||
range-captain=`${getComponent('projects').parameters.captains}`
|
||||
|
||||
required-status
|
||||
required-customer.name
|
||||
|
@ -10,7 +10,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
||||
div.segment.half.sm-full
|
||||
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='project.list.subTitle')
|
||||
div.segment.half.sm-full.text-right
|
||||
solid-ac-checker(data-src=`${getComponent('projects').endpoints.post}`, permission='acl:Append')
|
||||
solid-ac-checker(data-src=`${getComponent('projects').parameters.post}`, permission='acl:Append')
|
||||
solid-link(
|
||||
class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-margin-right-xsmall icon-plus'
|
||||
next=`admin-${getRoute('projects', true)}-create`
|
||||
@ -40,10 +40,9 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
||||
|
||||
solid-widget(name=`leave-project-reactivity`)
|
||||
template
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.dataSrc}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.dataSrcJoinable}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.post}` target-src='${value}')
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src='${value}')
|
||||
|
||||
solid-widget(name=`orbit-admin-project-leave-button`)
|
||||
@ -54,10 +53,9 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
||||
data-label=''
|
||||
data-trans='data-label=project.list.buttonQuit'
|
||||
)
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.dataSrc}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.dataSrcJoinable}` target-src='${src}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.post}` target-src='${src}')
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src='${src}')
|
||||
solid-display(
|
||||
data-src="${src}"
|
||||
@ -119,17 +117,16 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
||||
class-submit-button="add-member-button segment margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-arrow-right-circle children-icon-small children-icon-margin-right-xsmall"
|
||||
data-trans='submit-button=project.list.buttonJoin'
|
||||
)
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.dataSrc}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.dataSrcJoinable}` target-src='${value}')
|
||||
orbit-reactivity(data-src=`${getComponent('projects').parameters.post}` target-src='${value}')
|
||||
orbit-reactivity(bind-user nested-field="projects" target-src='${value}')
|
||||
|
||||
solid-display(
|
||||
class='table-body'
|
||||
filtered-by="admin-project-filter"
|
||||
|
||||
data-src=`${getComponent('projects').endpoints.get}joinable/`
|
||||
data-src=`${getComponent('projects').parameters.dataSrcJoinable}`
|
||||
fields='cell1(customer.name, counter, name), cell2(members), cell3(captain), cell4(joinButton)'
|
||||
loader-id='loader-admin-projects'
|
||||
|
||||
|
@ -16,7 +16,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
|
||||
solid-xmpp-chat(
|
||||
data-authentication='login'
|
||||
data-auto-login='true'
|
||||
data-websocket-url=component.endpoints.xmpp
|
||||
data-websocket-url=component.parameters.xmpp
|
||||
bind-resources
|
||||
uniq=component.uniq
|
||||
)
|
||||
|
@ -33,7 +33,7 @@ div.segment.full.padding-large.whitespace-normal
|
||||
required-owner
|
||||
required-subtitle
|
||||
required-community.community
|
||||
range-owner=`${component.endpoints.owners}`
|
||||
range-owner=`${component.parameters.owners}`
|
||||
|
||||
label-name=''
|
||||
label-owner=''
|
||||
@ -79,7 +79,7 @@ div.segment.full.padding-large.whitespace-normal
|
||||
bind-resources
|
||||
nested-field='members'
|
||||
fields='user'
|
||||
range-user=`${component.endpoints.users}`
|
||||
range-user=`${component.parameters.users}`
|
||||
|
||||
class-user='segment block margin-bottom'
|
||||
widget-user='solid-form-dropdown-autocompletion'
|
||||
|
@ -1,9 +1,9 @@
|
||||
solid-event(
|
||||
bind-resources
|
||||
nested-field="events"
|
||||
range-event-type=`${extension.endpoints.typeevents}`
|
||||
range-event-circle=`${getComponent('circles').endpoints.get}/`
|
||||
upload-dir=`${extension.endpoints.uploads}`
|
||||
range-event-type=`${extension.parameters.typeevents}`
|
||||
range-event-circle=`${extension.parameters.circles}`
|
||||
upload-dir=`${extension.parameters.uploads}`
|
||||
id-prefix='default'
|
||||
uniq=extension.uniq
|
||||
)
|
||||
|
@ -1,10 +1,10 @@
|
||||
solid-poll(
|
||||
bind-resources
|
||||
nested-field="polls"
|
||||
data-dest=extension.endpoints.post
|
||||
range-tags=extension.endpoints.pollRangeTags
|
||||
range-circles=extension.endpoints.pollRangeCircles
|
||||
upload-dir=extension.endpoints.uploads
|
||||
data-dest=extension.parameters.post
|
||||
range-tags=extension.parameters.pollRangeTags
|
||||
range-circles=extension.parameters.pollRangeCircles
|
||||
upload-dir=extension.parameters.uploads
|
||||
uniq=extension.uniq
|
||||
)&attributes({
|
||||
"display-start-end-dates": extension.parameters ? extension.parameters.displayStartEndDates : false
|
||||
|
@ -1,14 +1,14 @@
|
||||
solid-resource(
|
||||
bind-resources
|
||||
nested-field="resources"
|
||||
post-data-src=`${extension.endpoints.post}`
|
||||
range-resource-type=`${extension.endpoints.types}`
|
||||
post-data-type-src=`${extension.endpoints.postTypes}`
|
||||
range-resource-keyword=`${extension.endpoints.keywords}`
|
||||
post-data-keyword-src=`${extension.endpoints.postKeywords}`
|
||||
circles=`${extension.endpoints.circles}/`
|
||||
post-data-src=`${extension.parameters.post}`
|
||||
range-resource-type=`${extension.parameters.types}`
|
||||
post-data-type-src=`${extension.parameters.postTypes}`
|
||||
range-resource-keyword=`${extension.parameters.keywords}`
|
||||
post-data-keyword-src=`${extension.parameters.postKeywords}`
|
||||
circles=`${extension.parameters.circles}`
|
||||
associated-circle-label=""
|
||||
upload-dir=`${extension.endpoints.uploads}`
|
||||
upload-dir=`${extension.parameters.uploads}`
|
||||
id-prefix='circles'
|
||||
uniq=extension.uniq
|
||||
)
|
||||
|
@ -26,7 +26,7 @@
|
||||
div
|
||||
solid-display(
|
||||
class='segment full children children-quarter sm-children-full children-margin-bottom-medium sm-children-margin-bottom-xsmall children-padding-right-xsmall children-padding-left-xsmall sm-children-padding-none sm-whitespace-normal masonry pagination text-disable-selection'
|
||||
data-src=`${component.endpoints.get}`
|
||||
data-src=`${component.parameters.dataSrc}`
|
||||
loader-id=`loader-${component.route}-directory`
|
||||
fields='segment1(segment2(logo), segment3(name, profile.shortDescription, counter))'
|
||||
filtered-by=`communities-filter`
|
||||
|
@ -53,7 +53,7 @@ div.bg-color-white
|
||||
widget-profile.description="solid-form-richtext-label"
|
||||
widget-profile.email="orbit-communities-edit-email"
|
||||
widget-profile.website="orbit-communities-edit-website"
|
||||
upload-url-logo=component.endpoints.uploads
|
||||
upload-url-logo=component.parameters.uploads
|
||||
widget-logo="solid-form-image-label"
|
||||
|
||||
submit-button=""
|
||||
@ -70,9 +70,9 @@ div.bg-color-white
|
||||
|
||||
fields="profile.picture1, profile.picture2, profile.picture3"
|
||||
|
||||
upload-url-profile.picture1=component.endpoints.uploads
|
||||
upload-url-profile.picture2=component.endpoints.uploads
|
||||
upload-url-profile.picture3=component.endpoints.uploads
|
||||
upload-url-profile.picture1=component.parameters.uploads
|
||||
upload-url-profile.picture2=component.parameters.uploads
|
||||
upload-url-profile.picture3=component.parameters.uploads
|
||||
|
||||
widget-profile.picture1="solid-form-image-label"
|
||||
widget-profile.picture2="solid-form-image-label"
|
||||
|
@ -21,7 +21,7 @@
|
||||
span
|
||||
|
||||
solid-map.communities-map.margin-right-xsmall.margin-left-xsmall.sm-margin-none.shadow(
|
||||
data-src=`${component.endpoints.addresses}`
|
||||
data-src=`${component.parameters.addresses}`
|
||||
loader-id=`loader-${component.route}-map`
|
||||
fields="position(segment1(community.logo), segment2(community.name, community.profile.shortDescription, community.members))"
|
||||
|
||||
|
@ -20,7 +20,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
|
||||
solid-xmpp-chat(
|
||||
data-authentication='login'
|
||||
data-auto-login='true'
|
||||
data-websocket-url=component.endpoints.xmpp
|
||||
data-websocket-url=component.parameters.xmpp
|
||||
bind-resources
|
||||
uniq=component.uniq
|
||||
)
|
||||
|
@ -31,7 +31,7 @@ div.segment.full.padding-large.whitespace-normal
|
||||
solid-form.form(
|
||||
bind-resources
|
||||
|
||||
range-captain=`${getComponent('projects').endpoints.captains}`
|
||||
range-captain=`${getComponent('projects').parameters.captains}`
|
||||
|
||||
required-status
|
||||
required-customer.name
|
||||
@ -149,7 +149,7 @@ div.segment.full.padding-large.whitespace-normal
|
||||
bind-resources
|
||||
nested-field='members'
|
||||
fields='user'
|
||||
range-user=`${component.endpoints.users}`
|
||||
range-user=`${component.parameters.users}`
|
||||
|
||||
class-user='add-member'
|
||||
label-user=''
|
||||
|
@ -14,7 +14,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
|
||||
)
|
||||
solid-invoicing(
|
||||
bind-resources
|
||||
upload-dir=`${extension.endpoints.uploads}`
|
||||
upload-dir=`${extension.parameters.uploads}`
|
||||
logo-dir=`${client.logo}`
|
||||
uniq=extension.uniq
|
||||
)
|
@ -6,7 +6,7 @@
|
||||
|
||||
//- solid-picture.project-edit-picture(
|
||||
//- bind-resources
|
||||
//- upload-src=`${component.endpoints.uploads}`
|
||||
//- upload-src=`${component.parameters.uploads}`
|
||||
//- upload-id="solid-project-edit-picture"
|
||||
//- nested-fields='customer'
|
||||
//- fields='logo'
|
||||
|
Loading…
Reference in New Issue
Block a user