Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SemWeb
libview
Commits
e72f8a70bb1b
Commit
eb88abf8
authored
Jul 04, 2018
by
Laurent Wouters
Browse files
Adding new application framework
parent
067b93bd5410
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/services/defaults.re
View file @
e72f8a70
...
...
@@ -52,7 +52,7 @@ let renderRoot =
</
div
>;
};
let
renderCollection
=
let
renderCollection
Complete
=
(
self
:
ReasonReact
.
self
(
Framework
.
appState
,
_
,
Framework
.
appAction
)
,
state
:
Framework
.
appState
,
...
...
@@ -104,7 +104,19 @@ let renderCollection =
</
div
>;
};
let
renderEntity
=
let
renderCollection
=
(
self
:
ReasonReact
.
self
(
Framework
.
appState
,
_
,
Framework
.
appAction
)
,
state
:
Framework
.
appState
,
)
=>
{
let
resource
=
Framework
.
States
.
root_resource
(
state
);
switch
(
resource
.
data
)
{
|
None
=>
renderLoading
(
self
,
state
)
|
Some
(
_
)
=>
renderCollectionComplete
(
self
,
state
)
};
};
let
renderEntityComplete
=
(
_self
:
ReasonReact
.
self
(
Framework
.
appState
,
_
,
Framework
.
appAction
)
,
state
:
Framework
.
appState
,
...
...
@@ -136,6 +148,18 @@ let renderEntity =
</
div
>;
};
let
renderEntity
=
(
self
:
ReasonReact
.
self
(
Framework
.
appState
,
_
,
Framework
.
appAction
)
,
state
:
Framework
.
appState
,
)
=>
{
let
resource
=
Framework
.
States
.
root_resource
(
state
);
switch
(
resource
.
data
)
{
|
None
=>
renderLoading
(
self
,
state
)
|
Some
(
_
)
=>
renderEntityComplete
(
self
,
state
)
};
};
let
defaultRegistry
=
Framework
.
Create
.
registry
([
Framework
.
Create
.
view
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment