@@ -5,6 +5,7 @@ import Big from 'big.js';
55import { AuthenticationError } from 'util/errors' ;
66import { prefixTranslation } from 'util/translate' ;
77import { Store } from 'store' ;
8+ import { PUBLIC_URL } from '../../config' ;
89
910const { l } = prefixTranslation ( 'stores.appView' ) ;
1011
@@ -28,7 +29,7 @@ export default class AppView {
2829 }
2930
3031 get fullWidth ( ) {
31- return this . _store . router . location . pathname === ' /pool' ;
32+ return this . _store . router . location . pathname === ` ${ PUBLIC_URL } /pool` ;
3233 }
3334
3435 /** navigate to the specified route */
@@ -40,13 +41,13 @@ export default class AppView {
4041
4142 /** Change to the Auth page */
4243 gotoAuth ( ) {
43- this . goTo ( '/' ) ;
44+ this . goTo ( ` ${ PUBLIC_URL } /` ) ;
4445 this . _store . log . info ( 'Go to the Auth page' ) ;
4546 }
4647
4748 /** Change to the Loop page */
4849 goToLoop ( ) {
49- this . goTo ( ' /loop' ) ;
50+ this . goTo ( ` ${ PUBLIC_URL } /loop` ) ;
5051 this . _store . settingsStore . autoCollapseSidebar ( ) ;
5152 if ( ! this . _store . settingsStore . tourAutoShown ) {
5253 this . showTour ( ) ;
@@ -57,22 +58,22 @@ export default class AppView {
5758
5859 /** Change to the History page */
5960 goToHistory ( ) {
60- this . goTo ( ' /history' ) ;
61+ this . goTo ( ` ${ PUBLIC_URL } /history` ) ;
6162 this . _store . settingsStore . autoCollapseSidebar ( ) ;
6263 this . _store . log . info ( 'Go to the History page' ) ;
6364 }
6465
6566 /** Change to the Pool page */
6667 goToPool ( ) {
67- this . goTo ( ' /pool' ) ;
68+ this . goTo ( ` ${ PUBLIC_URL } /pool` ) ;
6869 // always collapse the sidebar to make room for the Pool sidebar
6970 this . _store . settingsStore . sidebarVisible = false ;
7071 this . _store . log . info ( 'Go to the Pool page' ) ;
7172 }
7273
7374 /** Change to the Settings page */
7475 goToSettings ( ) {
75- this . goTo ( ' /settings' ) ;
76+ this . goTo ( ` ${ PUBLIC_URL } /settings` ) ;
7677 this . _store . settingsStore . autoCollapseSidebar ( ) ;
7778 this . _store . log . info ( 'Go to the Settings page' ) ;
7879 }
@@ -163,7 +164,7 @@ export default class AppView {
163164 /** sets the selected setting to display */
164165 showSettings ( name : SettingName ) {
165166 const path = name === '' ? '' : `/${ name } ` ;
166- this . goTo ( `/settings${ path } ` ) ;
167+ this . goTo ( `${ PUBLIC_URL } /settings${ path } ` ) ;
167168 this . _store . log . info ( 'Switch to Setting screen' , name ) ;
168169 }
169170
0 commit comments