@@ -34,27 +34,28 @@ export default class AppView {
34
34
35
35
/** navigate to the specified route */
36
36
goTo ( route : string ) {
37
- if ( this . _store . router . location . pathname !== route ) {
38
- this . _store . router . push ( route ) ;
37
+ const path = `${ PUBLIC_URL } ${ route } ` ;
38
+ if ( this . _store . router . location . pathname !== path ) {
39
+ this . _store . router . push ( path ) ;
39
40
}
40
41
}
41
42
42
43
/** Change to the Auth page */
43
44
gotoAuth ( ) {
44
- this . goTo ( `${ PUBLIC_URL } /` ) ;
45
+ this . goTo ( `/` ) ;
45
46
this . _store . log . info ( 'Go to the Auth page' ) ;
46
47
}
47
48
48
49
/** Change to the Home page */
49
50
goToHome ( ) {
50
- this . goTo ( `${ PUBLIC_URL } /home` ) ;
51
+ this . goTo ( `/home` ) ;
51
52
this . _store . settingsStore . autoCollapseSidebar ( ) ;
52
53
this . _store . log . info ( 'Go to the Home page' ) ;
53
54
}
54
55
55
56
/** Change to the Loop page */
56
57
goToLoop ( ) {
57
- this . goTo ( `${ PUBLIC_URL } /loop` ) ;
58
+ this . goTo ( `/loop` ) ;
58
59
this . _store . settingsStore . autoCollapseSidebar ( ) ;
59
60
if ( ! this . _store . settingsStore . tourAutoShown ) {
60
61
this . showTour ( ) ;
@@ -65,36 +66,36 @@ export default class AppView {
65
66
66
67
/** Change to the History page */
67
68
goToHistory ( ) {
68
- this . goTo ( `${ PUBLIC_URL } /history` ) ;
69
+ this . goTo ( `/history` ) ;
69
70
this . _store . settingsStore . autoCollapseSidebar ( ) ;
70
71
this . _store . log . info ( 'Go to the History page' ) ;
71
72
}
72
73
73
74
/** Change to the Pool page */
74
75
goToPool ( ) {
75
- this . goTo ( `${ PUBLIC_URL } /pool` ) ;
76
+ this . goTo ( `/pool` ) ;
76
77
// always collapse the sidebar to make room for the Pool sidebar
77
78
this . _store . settingsStore . sidebarVisible = false ;
78
79
this . _store . log . info ( 'Go to the Pool page' ) ;
79
80
}
80
81
81
82
/** Change to the Settings page */
82
83
goToSettings ( ) {
83
- this . goTo ( `${ PUBLIC_URL } /settings` ) ;
84
+ this . goTo ( `/settings` ) ;
84
85
this . _store . settingsStore . autoCollapseSidebar ( ) ;
85
86
this . _store . log . info ( 'Go to the Settings page' ) ;
86
87
}
87
88
88
89
/** Change to the Connect page */
89
90
goToConnect ( ) {
90
- this . goTo ( `${ PUBLIC_URL } /connect` ) ;
91
+ this . goTo ( `/connect` ) ;
91
92
this . _store . settingsStore . autoCollapseSidebar ( ) ;
92
93
this . _store . log . info ( 'Go to the Connect page' ) ;
93
94
}
94
95
95
96
/** Change to the Connect Custom page */
96
97
goToConnectCustom ( ) {
97
- this . goTo ( `${ PUBLIC_URL } /connect/custom` ) ;
98
+ this . goTo ( `/connect/custom` ) ;
98
99
this . _store . settingsStore . autoCollapseSidebar ( ) ;
99
100
this . _store . log . info ( 'Go to the Connect Custom page' ) ;
100
101
}
@@ -185,7 +186,7 @@ export default class AppView {
185
186
/** sets the selected setting to display */
186
187
showSettings ( name : SettingName ) {
187
188
const path = name === '' ? '' : `/${ name } ` ;
188
- this . goTo ( `${ PUBLIC_URL } /settings${ path } ` ) ;
189
+ this . goTo ( `/settings${ path } ` ) ;
189
190
this . _store . log . info ( 'Switch to Setting screen' , name ) ;
190
191
}
191
192
0 commit comments