- Updated the login modal to include a user agreement section with clickable links to the user agreement and privacy policy. - Improved button styling and layout for better user experience. - Refactored avatar selection process to utilize local image paths, enhancing compatibility and reliability across different environments. - Added utility functions for resolving avatar file paths and selecting images from the gallery or camera. This update aims to streamline user interactions during login and avatar selection, ensuring a smoother experience.
31 lines
761 B
TypeScript
31 lines
761 B
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
||
import react from '@vitejs/plugin-react'
|
||
import path from 'node:path'
|
||
|
||
// https://vite.dev/config/
|
||
export default defineConfig(({ mode }) => {
|
||
const env = loadEnv(mode, process.cwd(), '')
|
||
// 默认走本机 soul-api :9100,避免未配 .env 时误连线上 release 导致 h5/login 403
|
||
const proxyTarget =
|
||
(env.VITE_PROXY_TARGET || '').trim() || 'http://127.0.0.1:9100'
|
||
const secure = proxyTarget.startsWith('https')
|
||
|
||
return {
|
||
plugins: [react()],
|
||
resolve: {
|
||
alias: {
|
||
'@': path.resolve(__dirname, 'src'),
|
||
},
|
||
},
|
||
server: {
|
||
proxy: {
|
||
'/api': {
|
||
target: proxyTarget,
|
||
changeOrigin: true,
|
||
secure,
|
||
},
|
||
},
|
||
},
|
||
}
|
||
})
|