Skip to content

Commit b8bc056

Browse files
authored
fix: no effect modify site title in site config (#461)
Signed-off-by: BobDu <i@bobdu.cc>
1 parent 93f0bd6 commit b8bc056

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ RUN pnpm install --production && rm -rf /root/.npm /root/.pnpm-store /usr/local/
5353

5454
COPY /service /app
5555

56-
COPY --from=frontend /app/replace-title.sh /app
57-
58-
RUN chmod +x /app/replace-title.sh
59-
6056
COPY --from=frontend /app/dist /app/public
6157

6258
COPY --from=backend /app/build /app/build
@@ -65,4 +61,4 @@ COPY --from=backend /app/src/utils/templates /app/build/utils/templates
6561

6662
EXPOSE 3002
6763

68-
CMD ["sh", "-c", "./replace-title.sh && node --import tsx/esm ./build/index.js"]
64+
CMD ["sh", "-c", "node --import tsx/esm ./build/index.js"]

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport"
99
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
1010
<meta name="theme-color">
11-
<title>${SITE_TITLE}</title>
11+
<title>Loading -ˋˏ✄┈┈┈┈</title>
1212
</head>
1313

1414
<body class="dark:bg-black">

replace-title.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

service/src/storage/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function getOriginConfig() {
4242
: '',
4343
process.env.HTTPS_PROXY,
4444
new SiteConfig(
45-
process.env.SITE_TITLE || 'ChatGpt Web',
45+
process.env.SITE_TITLE || 'ChatGPT Web',
4646
isNotEmptyString(process.env.AUTH_SECRET_KEY),
4747
process.env.AUTH_SECRET_KEY,
4848
process.env.REGISTER_ENABLED === 'true',

src/router/permission.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export function setupPageGuard(router: Router) {
88
if (!authStore.session) {
99
try {
1010
const data = await authStore.getSession()
11+
document.title = data.title
1112
if (String(data.auth) === 'false' && authStore.token)
1213
await authStore.removeToken()
1314
else

0 commit comments

Comments
 (0)