File tree Expand file tree Collapse file tree 6 files changed +64
-8
lines changed Expand file tree Collapse file tree 6 files changed +64
-8
lines changed Original file line number Diff line number Diff line change 2121 "eslint" : " 6.4.0" ,
2222 "standard" : " 14.3.1"
2323 }
24- }
24+ }
Original file line number Diff line number Diff line change @@ -18,5 +18,5 @@ install:
1818 - name : dashboard
1919 definition :
2020 path : ["dashboard"]
21- label : Dashboard
22- icon : dashboard
21+ label : Narratives
22+ icon : files-o
Original file line number Diff line number Diff line change @@ -44,5 +44,5 @@ install:
4444 menus : ["authenticated"]
4545 definition :
4646 path : ["dashboard"]
47- label : Dashboard
47+ label : Narratives
4848 icon : dashboard
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ source:
1414 - file : styles.css
1515install :
1616 widgets :
17- - module : ./dashboardPanel
18- id : dashboardPanel
17+ - module : ./dashboardRedirect
18+ id : dashboardRedirect
1919 type : factory
2020 - module : ./widgets/CollaboratorsWidget
2121 id : dashboardCollaborators
@@ -37,7 +37,7 @@ install:
3737 type : object
3838 routes :
3939 - path : ["dashboard"]
40- widget : dashboardPanel
40+ widget : dashboardRedirect
4141 authorization : true
4242 menu :
4343 - name : dashboard
@@ -49,5 +49,5 @@ install:
4949
5050views :
5151 - view : main
52- module : dashboardPanel
52+ module : dashboardRedirect
5353 type : factory
Original file line number Diff line number Diff line change 1+ define ( [ ] , ( ) => {
2+ 'use strict' ;
3+
4+ /*
5+ * Following the widget API in case anything goes wrong.
6+ * But this should be mostly a no-op that just redirects to the correct route.
7+ */
8+ const widget = ( config ) => {
9+ const path = '/dashboard-redesign' ;
10+ window . top . location . href = path ;
11+
12+ let container ,
13+ mount ;
14+ const runtime = config . runtime ;
15+
16+ // API
17+ function attach ( node ) {
18+ return Promise . try ( function ( ) {
19+ mount = node ;
20+ container = document . createElement ( 'div' ) ;
21+ mount . appendChild ( container ) ;
22+ runtime . send ( 'ui' , 'setTitle' , 'Your Narratives' ) ;
23+ container . innerHTML = `This should redirect to ${ path } ` ;
24+ } ) ;
25+ }
26+
27+ function start ( ) {
28+ return Promise . all ( ( ) => { } ) ;
29+ }
30+
31+ function run ( ) {
32+ return Promise . all ( ( ) => { } ) ;
33+ }
34+
35+ function stop ( ) {
36+ return Promise . all ( ( ) => { } ) ;
37+ }
38+
39+ function detach ( ) {
40+ return Promise . all ( ( ) => {
41+ container . innerHTML = '' ;
42+ } ) ;
43+ }
44+ return {
45+ attach : attach ,
46+ start : start ,
47+ run : run ,
48+ stop : stop ,
49+ detach : detach
50+ } ;
51+ }
52+
53+ return {
54+ make : ( config ) => widget ( config )
55+ } ;
56+ } ) ;
You can’t perform that action at this time.
0 commit comments