create-tengits-app 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tengits-app",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "🚀 快速创建基于 React + Rsbuild + TypeScript + Tailwind CSS + Antd 的现代前端项目脚手架",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -49,6 +49,7 @@
49
49
  "i18next": "^25.0.2",
50
50
  "i18next-http-backend": "^3.0.2",
51
51
  "react-i18next": "^15.5.1",
52
+ "tailwindcss": "^3.4.17",
52
53
  "@tailwindcss/forms": "0.5.7",
53
54
  "@tailwindcss/typography": "0.5.13",
54
55
  "tailwindcss-animate": "1.0.7"
@@ -1,5 +1,5 @@
1
1
  VITE_TITLE="AI"
2
- VITE_SYSTEM_NAME="AI"
2
+ VITE_SYSTEM_NAME="腾路前端"
3
3
  VITE_TENCENT_COS_APPID="1255466169"
4
4
  VITE_TENCENT_COS_BUCKET="ttos-test-1255466169"
5
5
  VITE_TENCENT_COS_REGION=ap-guangzhou
@@ -7,7 +7,7 @@
7
7
  "/static/js/vendors-node_modules_pnpm_rspack_core_1_4_8__swc_helpers_0_5_17_node_modules_rspack_core_dist-6d1c2b.js",
8
8
  "/index.html",
9
9
  "/static/js/async/node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-ponyfill_js_lazy-co-6570d5.js.map",
10
- "/index.a77ae4993f7bf23d.hot-update.js.map",
10
+ "/index.f79dfd3b9161b753.hot-update.js.map",
11
11
  "/static/js/index.js.map",
12
12
  "/static/js/lib-react.js.map",
13
13
  "/static/js/vendors-node_modules_pnpm_rspack_core_1_4_8__swc_helpers_0_5_17_node_modules_rspack_core_dist-6d1c2b.js.map"
@@ -17,7 +17,7 @@
17
17
  "assets": [
18
18
  "static/js/vendors-node_modules_pnpm_rspack_core_1_4_8__swc_helpers_0_5_17_node_modules_rspack_core_dist-6d1c2b.js.map",
19
19
  "static/js/lib-react.js.map",
20
- "index.a77ae4993f7bf23d.hot-update.js.map",
20
+ "index.f79dfd3b9161b753.hot-update.js.map",
21
21
  "static/js/index.js.map",
22
22
  "static/js/async/node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-ponyfill_js_lazy-co-6570d5.js.map"
23
23
  ],
@@ -44,15 +44,12 @@ export default defineConfig(({ env, envMode }) => {
44
44
  },
45
45
  server: {
46
46
  port: 3000,
47
- proxy: [
48
- // 添加你的代理配置
49
- // {
50
- // context: ['/api'],
51
- // target: 'http://localhost:8080',
52
- // changeOrigin: true,
53
- // ws: true,
54
- // }
55
- ],
47
+ proxy: [{
48
+ context: ['/tladapter', '/tlai', '/api', '/testuser', '/crud', '/ttos', '/saas', '/web', '/adapter', '/tlbi', '/sign'],
49
+ target: parsed.VITE_REACT_APP_HOST,
50
+ changeOrigin: true,
51
+ ws: true,
52
+ }],
56
53
  },
57
54
  output: {
58
55
  legalComments: 'none',
@@ -4,7 +4,7 @@ import i18n from './i18n';
4
4
  import { getMenus } from './menus';
5
5
  import { customRoutes, otherRoutes } from './routes';
6
6
 
7
- const { VITE_AI_APPLICATIONID } = import.meta.env;
7
+ const { VITE_SYSTEM_NAME } = import.meta.env;
8
8
 
9
9
  interface MenuItem {
10
10
  id: string | number;
@@ -81,7 +81,7 @@ function App() {
81
81
  <TUIApp
82
82
  appConfigDefaultStatus={{
83
83
  isNotJumpTongyi: true,
84
- systemName: i18n.t('AIWorkbench'),
84
+ systemName: VITE_SYSTEM_NAME,
85
85
  logoutProps: {
86
86
  api: '/saas/user/logout',
87
87
  },
@@ -34,7 +34,7 @@ const savedLanguage = localStorage.getItem('language') || getBrowserLanguage();
34
34
  const aiI18n = i18n.createInstance();
35
35
  // 创建新的i18n实例,避免与其他实例冲突
36
36
 
37
- const allNamespaces = ['AIWorkbench', 'bs', 'Common', 'flow'];
37
+ const allNamespaces = ['Common'];
38
38
 
39
39
  // 创建新的i18n实例,避免与其他实例冲突
40
40
  const nsMap = {
@@ -51,7 +51,7 @@ export const initializeAiI18n = async (options = {}) => {
51
51
  // 使用Backend和initReactI18next插件
52
52
  // 根据当前路由设置默认命名空间
53
53
  const currentPath = window.location.pathname;
54
- let defaultNS = 'AIWorkbench'; // 默认命名空间
54
+ let defaultNS = 'Common'; // 默认命名空间
55
55
 
56
56
  // 根据路由路径设置对应的命名空间
57
57
  // 使用nsMap来映射路径到命名空间
@@ -81,7 +81,7 @@ export const initializeAiI18n = async (options = {}) => {
81
81
  ns: allNamespaces, // 指定命名空间
82
82
  // ns: initialNamespaces, // 只指定初始命名空间
83
83
  defaultNS, // 默认命名空间
84
- fallbackNS: 'AIWorkbench', // 回退命名空间
84
+ fallbackNS: 'Common', // 回退命名空间
85
85
  backend: {
86
86
  loadPath: '/locales/{{lng}}/{{ns}}.json',
87
87
  },
@@ -8,7 +8,6 @@ import { initializeAiI18n } from './i18n';
8
8
  import './index.less';
9
9
 
10
10
  window.systemId = '100';
11
- // PlatformType 1- 平台端 2-租户端 3-客户端
12
11
  window.tenantParams = {
13
12
  platformType: 3,
14
13
  };
@@ -40,7 +40,7 @@ const defaultConfig = {
40
40
  interface LoginProps {
41
41
  page: 'login' | 'resetPass';
42
42
  }
43
- const TTOSHost = import.meta.env.VITE_REACT_APP_HOST;
43
+ const {VITE_REACT_APP_HOST:TTOSHost, VITE_SYSTEM_NAME} = import.meta.env;
44
44
  export default function Login({ page = 'login' }: LoginProps) {
45
45
  const { message } = App.useApp();
46
46
  const navigate = useNavigate();
@@ -133,7 +133,7 @@ export default function Login({ page = 'login' }: LoginProps) {
133
133
 
134
134
  /** 登录页配置项转换 */
135
135
  const resultPageConfig = () => ({
136
- sysTitle: t('AIWorkbench'),
136
+ sysTitle: VITE_SYSTEM_NAME,
137
137
  ...pageConfig,
138
138
  sysSubTitle: systemSubTitle,
139
139
  LoginLogo: logo,