Compare commits

...

6 Commits

Author SHA1 Message Date
sugarBecomer 05eaa4741a 🐛 混淆前端打包后代码 2026-03-27 22:00:19 +08:00
sugarBecomer c0d5b4697f 🐛 混淆前端打包后代码 2026-03-27 21:17:55 +08:00
sugarBecomer d742425cac ✨ 混淆前端打包后代码 2026-03-27 16:38:42 +08:00
sugarBecomer 5729e88687 ✨ 混淆前端打包后代码 2026-03-27 16:37:14 +08:00
sugarBecomer 0681aad27d 🐛 修复生成邀请码 2026-03-27 16:32:22 +08:00
sugarBecomer ed38bfd463 🐛 修复邮件问题 2026-03-27 16:12:34 +08:00
6 changed files with 1154 additions and 6 deletions
+8
View File
@@ -19,9 +19,17 @@ http:// {
reverse_proxy ${BACKEND_URL}
}
@assets path /assets/* /favicon.svg
handle @assets {
root * /www
header Cache-Control "public, max-age=31536000, immutable"
file_server
}
handle {
root * /www
try_files {path} /index.html
header Cache-Control "no-store, no-cache, must-revalidate"
file_server
}
+1094
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -39,6 +39,7 @@
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.3",
"vite": "^8.0.1",
"vite-plugin-bundle-obfuscator": "^1.11.0",
"vue-tsc": "^3.2.5"
}
}
+1 -1
View File
@@ -34,5 +34,5 @@ export const userApi = {
/** 生成邀请码 */
generateInviteCode: () =>
request.post<any, ApiResponse>('/v1/user/generate-invite-code'),
request.post<any, ApiResponse>('/v1/user/generateInviteCode'),
}
+8 -4
View File
@@ -158,7 +158,8 @@ const smtpConfig = ref<SmtpConfig>({
const isOAuthMode = computed(() => smtpConfig.value.authMode === 'outlook_oauth2')
function resolveApiOrigin() {
return new URL(defaultOAuthRedirectUrl).origin
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL || '/api'
return new URL(apiBaseUrl, window.location.origin).origin
}
function applyModeDefaults(mode: SmtpConfig['authMode']) {
@@ -278,14 +279,17 @@ async function startOutlookAuthorize() {
window.addEventListener('message', onMessage)
})
if (!result.success || !result.refreshToken) {
if (!result.success) {
toast.error(result.message || '授权失败')
return
}
smtpConfig.value.oauthRefreshToken = result.refreshToken
if (result.refreshToken) {
smtpConfig.value.oauthRefreshToken = result.refreshToken
}
await fetchSmtpConfig()
smtpConfig.value.oauthRedirectUrl = defaultOAuthRedirectUrl
toast.success('Outlook 授权成功,Refresh Token 已自动回填')
toast.success('Outlook 授权成功,Refresh Token 已保存并刷新显示')
} catch (error: any) {
toast.error(error?.message || '获取 Outlook 授权失败')
} finally {
+42 -1
View File
@@ -2,9 +2,50 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'
import vitePluginBundleObfuscator from 'vite-plugin-bundle-obfuscator'
export default defineConfig({
plugins: [vue(), tailwindcss()],
plugins: [
vue(),
tailwindcss(),
vitePluginBundleObfuscator({
apply: 'build',
log: true,
autoExcludeNodeModules: true,
threadPool: true,
excludes: [
/assets\/rolldown-runtime-.*\.js$/,
],
options: {
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: 0,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
ignoreImports: true,
numbersToExpressions: false,
renameGlobals: false,
selfDefending: false,
simplify: true,
splitStrings: false,
stringArray: true,
stringArrayCallsTransform: false,
stringArrayEncoding: [],
stringArrayIndexShift: true,
stringArrayRotate: true,
stringArrayShuffle: true,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersCount: 1,
stringArrayWrappersParametersMaxCount: 2,
stringArrayWrappersType: 'variable',
stringArrayThreshold: 0.75,
transformObjectKeys: false,
unicodeEscapeSequence: false,
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))