@@ -80,6 +80,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
80
80
on-authenticated =" { state .onAuthenticated }"
81
81
opened =" { state .authenticationDialogOpened }"
82
82
></registry-authentication >
83
+ <error-page
84
+ if =" { state .pageError }"
85
+ code =" { state .pageError .code }"
86
+ status =" { state .pageError .status }"
87
+ message =" { state .pageError .message }"
88
+ url =" { state .pageError .url }"
89
+ ></error-page >
83
90
<material-snackbar message =" { state .snackbarMessage }" is-error =" { state .snackbarIsError }" ></material-snackbar >
84
91
</main >
85
92
<footer >
@@ -105,6 +112,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
105
112
import TagHistory from ' ./tag-history/tag-history.riot' ;
106
113
import DialogsMenu from ' ./dialogs/dialogs-menu.riot' ;
107
114
import SearchBar from ' ./search-bar.riot' ;
115
+ import ErrorPage from ' ./error-page.riot' ;
108
116
import { stripHttps , getRegistryServers , setRegistryServers , truthy , stringToArray } from ' ../scripts/utils' ;
109
117
import router from ' ../scripts/router' ;
110
118
import { loadTheme } from ' ../scripts/theme' ;
@@ -118,6 +126,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
118
126
SearchBar,
119
127
Router,
120
128
Route,
129
+ ErrorPage,
121
130
},
122
131
onUpdated (props , state ) {
123
132
state .snackbarIsError = false ;
@@ -184,6 +193,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
184
193
snackbarMessage: message,
185
194
snackbarIsError: isError || false ,
186
195
});
196
+ } else if (message && message .code ) {
197
+ this .update ({
198
+ pageError: message,
199
+ });
200
+ setTimeout (() => delete this .state [' pageError' ], 1000 );
187
201
} else if (message && message .message ) {
188
202
this .update ({
189
203
snackbarMessage: message .message ,
0 commit comments