Skip to content

Commit 6b9e12c

Browse files
committed
Fixing bugs, adding forgotten images, removing unused stuff.
1 parent 43d6b61 commit 6b9e12c

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

etc/env.json.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"PORT": 8080,
33
"URL_PATH_PREFIX": "",
44
"API_BASE": "https://siscodex.base.domain/api",
5-
"RECODEX_URI:": "https://recodex.webapp.domain",
5+
"RECODEX_URI": "https://recodex.webapp.domain",
66
"TITLE": "SIS-CodEx",
77
"SKIN": "success",
88
"PERSISTENT_TOKENS_KEY_PREFIX": "recodex-sis"

public/public/favicon.ico

318 Bytes
Binary file not shown.

public/public/logo-bare.png

30.4 KB
Loading

src/helpers/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { safeGet, canUseDOM } from './common.js';
44
export const getConfigVar = name => {
55
let MY_VAR = '';
66
if (canUseDOM) {
7-
MY_VAR = safeGet(window, ['__RECODEX_CONFIG__', name], '');
7+
MY_VAR = safeGet(window, ['__SISCODEX_CONFIG__', name], '');
88
} else {
99
MY_VAR = JSON.parse(fs.readFileSync('etc/env.json', 'utf8'))[name] || '';
1010
}

src/pages/routes.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ const getRedirect = (routeObj, urlPath, isLoggedIn) => {
9090
*/
9191
export const match = (urlPath, isLoggedIn) => {
9292
const routeObj = routesDescriptors.find(({ route }) => matchPath(route, urlPath) !== null);
93-
const component = routeObj && unwrap(routeObj.component);
93+
if (!routeObj) {
94+
return {};
95+
}
96+
97+
const component = unwrap(routeObj.component);
9498

9599
const redirect = getRedirect(routeObj, urlPath, isLoggedIn);
96100
const match = matchPath(routeObj.route, urlPath);

src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ app.get('*', (req, res) => {
9090
*/
9191

9292
const userId = loggedInUserIdSelector(store.getState()); // try to get the user ID from the token (if any)
93-
const { redirect /*, params, loadAsync */ } = match(location, Boolean(userId));
93+
const { redirect = null /*, params, loadAsync */ } = match(location, Boolean(userId));
9494

9595
if (redirect) {
9696
res.redirect(302, redirect);

views/index.ejs

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1" />
1010
<link rel="icon" type="image/png" href="<%= urlPrefix %>/public/favicon.ico" />
1111
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
12-
13-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" />
14-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.16.2/build/styles/default.min.css">
1512
<link
1613
rel="stylesheet"
1714
href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css"
@@ -72,13 +69,11 @@
7269
</head>
7370

7471
<body class="loading" style="height: auto">
75-
<div id="loading-screen">
76-
<%= ((new Date()).getMonth() === 3 && (new Date()).getDate() === 1) ? 'Loudím' : 'Loading' %>...
77-
</div>
72+
<div id="loading-screen">Loading...</div>
7873

7974
<div id="root"></div>
8075
<script>
81-
window.__RECODEX_CONFIG__ = <%- config %>;
76+
window.__SISCODEX_CONFIG__ = <%- config %>;
8277
</script>
8378
<script src="<%= bundle %>"></script>
8479
<script>

0 commit comments

Comments
 (0)