diff --git a/mail-vue/index.html b/mail-vue/index.html
index b8cd118..b809f6a 100644
--- a/mail-vue/index.html
+++ b/mail-vue/index.html
@@ -3,6 +3,7 @@
+
+
{{ $t('S3配置') }}
+
+
+
+
+
+
@@ -347,20 +355,20 @@
{{ $t('community') }} :
-
+
{{ $t('support') }} :
@@ -672,6 +680,7 @@ const userStore = useUserStore();
const editTitleShow = ref(false)
const resendTokenFormShow = ref(false)
const r2DomainShow = ref(false)
+const ossConfigShow = ref(false)
const turnstileShow = ref(false)
const tgSettingShow = ref(false)
const noticePopupShow = ref(false)
@@ -1173,6 +1182,7 @@ function editSetting(settingForm, refreshStatus = true) {
overflow: hidden;
background: var(--extra-light-fill) !important;
position: relative;
+
.loading {
display: flex;
align-items: center;
@@ -1522,9 +1532,11 @@ function editSetting(settingForm, refreshStatus = true) {
row-gap: 10px;
flex-wrap: wrap;
}
+
:deep(.el-button) {
padding: 0 10px;
font-weight: normal;
+
i {
font-size: 22px;
}
diff --git a/mail-vue/vite.config.js b/mail-vue/vite.config.js
index 2d7d970..f33dc16 100644
--- a/mail-vue/vite.config.js
+++ b/mail-vue/vite.config.js
@@ -1,37 +1,60 @@
-import {defineConfig,loadEnv} from 'vite'
+import {defineConfig, loadEnv} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
-import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
+import {ElementPlusResolver} from 'unplugin-vue-components/resolvers'
+import {VitePWA} from 'vite-plugin-pwa';
export default defineConfig(({mode}) => {
- const env = loadEnv(mode, process.cwd(), 'VITE')
- return {
- server: {
- host: true,
- port: 3001,
- hmr: true,
- },
- base: env.VITE_STATIC_URL || '/',
- plugins: [vue(),
- AutoImport({
- resolvers: [ElementPlusResolver()],
- }),
- Components({
- resolvers: [ElementPlusResolver()],
- })
- ],
- resolve: {
- alias: {
- '@': path.resolve(__dirname, 'src')
- }
- },
- build: {
- target: 'es2022',
- outDir: env.VITE_OUT_DIR || 'dist',
- emptyOutDir: true,
- assetsInclude: ['**/*.json']
+ const env = loadEnv(mode, process.cwd(), 'VITE')
+ return {
+ server: {
+ host: true,
+ port: 3001,
+ hmr: true,
+ },
+ base: env.VITE_STATIC_URL || '/',
+ plugins: [vue(),
+ VitePWA({
+ registerType: 'autoUpdate', // 配置 service worker 的注册方式
+ includeAssets: ['favicon.svg', 'robots.txt'], // 指定需要包含的静态资源
+ manifest: {
+ name: 'Cloud Mail',
+ short_name: 'Cloud Mail',
+ background_color: '#FFFFFF',
+ theme_color: '#FFFFFF',
+ icons: [
+ {
+ src: 'mail-192.png',//像素尺寸一定要对应
+ sizes: '192x192',
+ type: 'image/png',
+ },
+ {
+ src: 'mail-512.png',
+ sizes: '512x512',
+ type: 'image/png',
+ },
+ ],
+ },
+ }),
+ AutoImport({
+ resolvers: [ElementPlusResolver()],
+ }),
+ Components({
+ resolvers: [ElementPlusResolver()],
+ })
+ ],
+ resolve: {
+ alias: {
+ '@': path.resolve(__dirname, 'src')
+ }
+ },
+ build: {
+ target: 'es2022',
+ outDir: env.VITE_OUT_DIR || 'dist',
+ emptyOutDir: true,
+ assetsInclude: ['**/*.json']
+ }
}
- }
})