feat: fix compose.yml ;add frontend .env properties
This commit is contained in:
parent
0e267b923c
commit
2994a48e19
|
|
@ -18,6 +18,7 @@ services:
|
||||||
- compose.env
|
- compose.env
|
||||||
volumes:
|
volumes:
|
||||||
- mysql-data:/var/lib/mysql
|
- mysql-data:/var/lib/mysql
|
||||||
|
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||||
networks:
|
networks:
|
||||||
- email-network
|
- email-network
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
VITE_APP_DOMAIN=shenjianl.cn
|
||||||
|
VITE_GITEA_URL=https://gitea.shenjianl.cn/shenjianZ/email-unlimit
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
|
<script setup>
|
||||||
|
const giteaUrl = import.meta.env.VITE_GITEA_URL;
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<header class="app-header">
|
<header class="app-header">
|
||||||
<router-link to="/" class="logo-link">
|
<router-link to="/" class="logo-link">
|
||||||
<div class="logo">Email Unlimit</div>
|
<div class="logo">Email Unlimit</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
<nav class="nav-links">
|
<nav class="nav-links">
|
||||||
<a href="https://gitea.shenjianl.cn/shenjianZ/email-unlimit" target="_blank">Gitee</a>
|
<a :href="giteaUrl" target="_blank">Gitea</a>
|
||||||
<router-link to="/settings" class="settings-link" title="设置">
|
<router-link to="/settings" class="settings-link" title="设置">
|
||||||
<img src="@/assets/setting.svg" alt="Settings" class="settings-icon" />
|
<img src="@/assets/setting.svg" alt="Settings" class="settings-icon" />
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<main id="app-main">
|
<main id="app-main">
|
||||||
<section class="hero-section">
|
<section class="hero-section">
|
||||||
<h1>{{ $t('home.title') }}</h1>
|
<h1>{{ $t('home.title') }}</h1>
|
||||||
<p>{{ $t('home.subtitle') }}<code>@shenjianl.cn</code>{{ $t('home.subtitleAfter') }}</p>
|
<p>{{ $t('home.subtitle') }}<code>@{{ domain }}</code>{{ $t('home.subtitleAfter') }}</p>
|
||||||
<form @submit.prevent="fetchMessages" class="input-group">
|
<form @submit.prevent="fetchMessages" class="input-group">
|
||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<input
|
<input
|
||||||
|
|
@ -105,14 +105,14 @@ if (import.meta.env.DEV) {
|
||||||
selectedMessage.value = {
|
selectedMessage.value = {
|
||||||
id: 'sample-1',
|
id: 'sample-1',
|
||||||
sender: 'demo@example.com',
|
sender: 'demo@example.com',
|
||||||
recipient: 'you@shenjianl.cn',
|
recipient: `you@${domain}`,
|
||||||
subject: 'Markdown 样式测试邮件',
|
subject: 'Markdown 样式测试邮件',
|
||||||
body: `# 会议议程:项目启动会\n\n大家好,\n\n这是关于 **“Email-Unlimit”** 项目启动会的议程安排。\n\n---\n\n## 会议详情\n\n- **日期**: 2025年7月30日\n- **时间**: 上午10:00\n- **地点**: 线上会议室 (链接稍后提供)\n\n## 议程\n\n1. **项目介绍** - 介绍项目目标和范围。\n2. **团队分工** - 明确各自的职责。\n3. **技术选型** - 讨论并确认技术栈。\n4. **Q&A** - 自由提问环节。\n\n请准时参加。\n\n谢谢!\n\n> 这是一条重要的提醒:请提前准备好您的问题。`
|
body: `# 会议议程:项目启动会\n\n大家好,\n\n这是关于 **“Email-Unlimit”** 项目启动会的议程安排。\n\n---\n\n## 会议详情\n\n- **日期**: 2025年7月30日\n- **时间**: 上午10:00\n- **地点**: 线上会议室 (链接稍后提供)\n\n## 议程\n\n1. **项目介绍** - 介绍项目目标和范围。\n2. **团队分工** - 明确各自的职责。\n3. **技术选型** - 讨论并确认技术栈。\n4. **Q&A** - 自由提问环节。\n\n请准时参加。\n\n谢谢!\n\n> 这是一条重要的提醒:请提前准备好您的问题。`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const copyStatus = ref('idle'); // 'idle' | 'copied'
|
const copyStatus = ref('idle'); // 'idle' | 'copied'
|
||||||
const domain = 'shenjianl.cn';
|
const domain = import.meta.env.VITE_APP_DOMAIN;
|
||||||
const attachments = ref([]);
|
const attachments = ref([]);
|
||||||
const attachmentsLoading = ref(false);
|
const attachmentsLoading = ref(false);
|
||||||
const newMailNotification = ref(false);
|
const newMailNotification = ref(false);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,17 @@
|
||||||
|
<script setup>
|
||||||
|
import { useLanguageStore } from '@/stores/language';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
const domain = import.meta.env.VITE_APP_DOMAIN;
|
||||||
|
const languageStore = useLanguageStore();
|
||||||
|
|
||||||
|
const setLanguage = (lang) => {
|
||||||
|
languageStore.setLocale(lang);
|
||||||
|
};
|
||||||
|
|
||||||
|
const currentLocale = computed(() => languageStore.locale);
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="settings-page">
|
<div class="settings-page">
|
||||||
<div class="settings-container">
|
<div class="settings-container">
|
||||||
|
|
@ -5,7 +19,7 @@
|
||||||
<ol>
|
<ol>
|
||||||
<i18n-t keypath="howItWorks.step1" tag="li">
|
<i18n-t keypath="howItWorks.step1" tag="li">
|
||||||
<template #domain>
|
<template #domain>
|
||||||
<code>@{{ 'shenjianl.cn' }}</code>
|
<code>@{{ domain }}</code>
|
||||||
</template>
|
</template>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
<li>{{ $t('howItWorks.step2') }}</li>
|
<li>{{ $t('howItWorks.step2') }}</li>
|
||||||
|
|
@ -22,25 +36,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { useLanguageStore } from '@/stores/language';
|
|
||||||
import { computed } from 'vue';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Settings',
|
name: 'Settings',
|
||||||
setup() {
|
|
||||||
const languageStore = useLanguageStore();
|
|
||||||
|
|
||||||
const setLanguage = (lang) => {
|
|
||||||
languageStore.setLocale(lang);
|
|
||||||
};
|
|
||||||
|
|
||||||
const currentLocale = computed(() => languageStore.locale);
|
|
||||||
|
|
||||||
return {
|
|
||||||
setLanguage,
|
|
||||||
currentLocale,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue