Skip to content

Commit 22a6dec

Browse files
update recommend questions
1 parent aae969d commit 22a6dec

12 files changed

Lines changed: 1262 additions & 9 deletions

File tree

assets/index-BMFJWG8p.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-BXXf8wj-.js

Lines changed: 313 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-B_Q1ekuy.js

Lines changed: 313 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-DYVZpLk5.js

Lines changed: 313 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-Dfdd2BvZ.js

Lines changed: 313 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/database/career_advisor.db

12 KB
Binary file not shown.

frontend/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}(window.location));
1717
</script>
1818
<script src="./runtime-config.js"></script>
19-
<script type="module" crossorigin src="./assets/index-BRRsefk5.js"></script>
19+
<script type="module" crossorigin src="./assets/index-DYVZpLk5.js"></script>
2020
<link rel="stylesheet" crossorigin href="./assets/index-B-t5DAid.css">
2121
</head>
2222
<body>

frontend/dist/runtime-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
window.__API_BASE__ = window.__API_BASE__ || '';
2-
window.__IS_OFFLINE__ = window.__IS_OFFLINE__ ?? (!window.__API_BASE__ && /(^|\.)github\.io$/i.test(window.location.hostname));
2+
window.__IS_OFFLINE__ = window.__IS_OFFLINE__ ?? (!window.__API_BASE__ && !/^(localhost|127\.0\.0\.1)$/i.test(window.location.hostname));

frontend/public/runtime-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
window.__API_BASE__ = window.__API_BASE__ || '';
2-
window.__IS_OFFLINE__ = window.__IS_OFFLINE__ ?? (!window.__API_BASE__ && /(^|\.)github\.io$/i.test(window.location.hostname));
2+
window.__IS_OFFLINE__ = window.__IS_OFFLINE__ ?? (!window.__API_BASE__ && !/^(localhost|127\.0\.0\.1)$/i.test(window.location.hostname));

frontend/src/config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ const runtimeApiBase = normalizeBaseUrl(
77
);
88
const envApiBase = normalizeBaseUrl(import.meta.env.VITE_API_BASE);
99
const hostname = typeof window !== 'undefined' ? window.location.hostname : '';
10-
const isGithubPages = /(^|\.)github\.io$/i.test(hostname);
10+
const isLocalhost = /^(localhost|127\.0\.0\.1)$/i.test(hostname);
1111

12-
const fallbackApiBase = isGithubPages ? '' : 'http://localhost:3001';
12+
const fallbackApiBase = isLocalhost ? 'http://localhost:3001' : '';
1313
const configuredApiBase = runtimeApiBase || envApiBase || fallbackApiBase;
1414

1515
const runtimeOffline = typeof window !== 'undefined' ? window.__IS_OFFLINE__ : undefined;
1616
const envOffline = import.meta.env.VITE_OFFLINE_MODE === 'true';
17-
const autoOfflineForGithub = isGithubPages && !configuredApiBase;
17+
const autoOfflineWithoutApi = !configuredApiBase && !isLocalhost;
1818

1919
export const API_BASE = configuredApiBase;
20-
export const IS_OFFLINE = Boolean(runtimeOffline ?? envOffline ?? autoOfflineForGithub);
20+
export const IS_OFFLINE = Boolean(runtimeOffline ?? envOffline ?? autoOfflineWithoutApi);

0 commit comments

Comments
 (0)