瀏覽代碼

fix: 登录页面使用 APP_TITLE 环境变量,去除 Logo 和底部信息

- 页面 title 改为读取 APP_TITLE 环境变量
- 登录表单去掉 Logo 图片,显示 APP_TITLE 文字
- 移除登录页 Footer(版权、帮助、版本信息)
kinglee 1 周之前
父節點
當前提交
923c884cfc
共有 4 個文件被更改,包括 4 次插入13 次删除
  1. 1 1
      .env
  2. 1 1
      config/config.ts
  3. 2 9
      src/pages/login/components/login-form.tsx
  4. 0 2
      src/pages/login/index.tsx

+ 1 - 1
.env

@@ -4,7 +4,7 @@ UMI_DEV_SERVER_COMPRESS=none
 DID_YOU_KNOW=none
 
 # 应用标题
-APP_TITLE=成都网讯MaaS底座
+APP_TITLE=网讯创智MaaS底座
 
 # 是否启用 Playground
 ENABLE_PLAYGROUND=false

+ 1 - 1
config/config.ts

@@ -81,7 +81,7 @@ export default defineConfig({
   antd: {
     style: 'less'
   },
-  title: 'GPUStack',
+  title: process.env.APP_TITLE || '网讯创智MaaS底座',
   hash: true,
   access: {},
   model: {},

+ 2 - 9
src/pages/login/components/login-form.tsx

@@ -1,4 +1,3 @@
-import LogoIcon from '@/assets/images/gpustack-logo.png';
 import { userAtom } from '@/atoms/user';
 import { useIntl, useModel } from '@umijs/max';
 import { Button, Divider, Form, Spin, message } from 'antd';
@@ -97,17 +96,11 @@ const LoginForm = () => {
   const [loading, setLoading] = useState(false);
 
   const renderWelCome = () => {
+    const appTitle = process.env.APP_TITLE || 'GPUStack';
     return (
       <div className={styles.welcome}>
         <div className="flex-center">
-          <span className="text">
-            {intl?.formatMessage({ id: 'users.login.title' })}
-          </span>
-          <img
-            src={LogoIcon}
-            alt="logo"
-            style={{ height: '36px', marginLeft: 10 }}
-          />
+          <span className="text">{appTitle}</span>
         </div>
       </div>
     );

+ 0 - 2
src/pages/login/index.tsx

@@ -2,7 +2,6 @@ import LogoIcon from '@/assets/images/gpustack-logo.png';
 import { initialPasswordAtom, userAtom } from '@/atoms/user';
 import { resetStorageUserSettings } from '@/atoms/utils';
 import DarkMask from '@/components/dark-mask';
-import Footer from '@/components/footer';
 import LangSelect from '@/components/lang-select';
 import ThemeDropActions from '@/components/theme-toggle/theme-drop-actions';
 import { PasswordReg } from '@/config';
@@ -254,7 +253,6 @@ const Login = () => {
                 )}
               </FormWrapper>
             </div>
-            <Footer />
           </Box>
         )}
       </CoreUIProvider>