diff --git a/web/src/App.vue b/web/src/App.vue index b94d4e33..56e6a15f 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -10,6 +10,7 @@ import { useRoute } from 'vue-router' import { useConfig } from '/@/stores/config' import { setTitleFromRoute } from '/@/utils/common' import iconfontInit from '/@/utils/iconfont' +import { init as viteInit } from '/@/utils/vite' // modules import mark, Please do not remove. const route = useRoute() @@ -19,6 +20,7 @@ const config = useConfig() const { getLocaleMessage } = useI18n() const lang = getLocaleMessage(config.lang.defaultLang) as any onMounted(() => { + viteInit() iconfontInit() // Modules onMounted mark, Please do not remove. diff --git a/web/src/lang/backend/en.ts b/web/src/lang/backend/en.ts index fdc6ded8..b5a00cd2 100644 --- a/web/src/lang/backend/en.ts +++ b/web/src/lang/backend/en.ts @@ -74,4 +74,18 @@ export default { 'Newly added tasks will never start because they are blocked by failed tasks!(Web terminal)', 'Failed to modify the source command, Please try again manually': 'Failed to modify the source command. Please try again manually.', }, + vite: { + Later: '稍后', + 'Restart hot update': '重启热更新', + 'Close type terminal': 'WEB Terminal server', + 'Close type crud': 'CRUD server', + 'Close type modules': 'module install server', + 'Close type config': 'system configuration server', + 'Reload hot server title': 'Need to restart Vite hot update service', + 'Reload hot server tips 1': 'To ensure that ', + 'Reload hot server tips 2': + " is not interrupted, the system has temporarily suspended Vite's hot update function. During this period, changes to front-end files will not be updated in real-time and web pages will not be automatically reloaded. It has been detected that there are file updates during the service suspension period, and the hot update service needs to be restarted.", + 'Reload hot server tips 3': + 'The pause of hot updates does not affect the already loaded functions. You can continue to operate and click to restart the hot update service after everything is ready.', + }, } diff --git a/web/src/lang/backend/en/module.ts b/web/src/lang/backend/en/module.ts index 1ac1fba2..cd4a333e 100644 --- a/web/src/lang/backend/en/module.ts +++ b/web/src/lang/backend/en/module.ts @@ -156,4 +156,9 @@ export default { 'Wait for installation': 'Wait for installation', 'Conflict pending': 'Conflict pending', 'Dependency to be installed': 'Dependency to be installed', + 'Restart Vite hot server': 'Restart Vite hot server', + 'Restart Vite hot server tips': + 'Before successfully restarting the service, you can find the button to manually restart the service from the button group on the right side of the top bar.', + 'Manual restart': 'Manual restart', + 'Restart Now': 'Restart Now', } diff --git a/web/src/lang/backend/zh-cn.ts b/web/src/lang/backend/zh-cn.ts index d597fe26..4d76c356 100644 --- a/web/src/lang/backend/zh-cn.ts +++ b/web/src/lang/backend/zh-cn.ts @@ -74,4 +74,17 @@ export default { 'Newly added tasks will never start because they are blocked by failed tasks': '新添加的任务永远不会开始,因为被失败的任务阻塞!(WEB终端)', 'Failed to modify the source command, Please try again manually': '修改源的命令执行失败,请手动重试。', }, + vite: { + Later: '稍后', + 'Restart hot update': '重启热更新', + 'Close type terminal': 'WEB终端执行命令', + 'Close type crud': 'CRUD代码生成服务', + 'Close type modules': '模块安装服务', + 'Close type config': '修改系统配置', + 'Reload hot server title': '需要重启 Vite 热更新服务', + 'Reload hot server tips 1': '为确保', + 'Reload hot server tips 2': + '不被打断,系统暂停了 Vite 的热更新功能,期间前端文件变动将不会实时更新和自动重载网页,现检测到服务暂停期间存在文件更新,需要重启热更新服务。', + 'Reload hot server tips 3': '热更新暂停不影响已经加载好的功能,您可以继续操作,并在一切就绪后再点击重新启动热更新服务。', + }, } diff --git a/web/src/lang/backend/zh-cn/module.ts b/web/src/lang/backend/zh-cn/module.ts index 41fa09ca..018dbc1f 100644 --- a/web/src/lang/backend/zh-cn/module.ts +++ b/web/src/lang/backend/zh-cn/module.ts @@ -148,4 +148,8 @@ export default { 'Wait for installation': '等待安装', 'Conflict pending': '冲突待处理', 'Dependency to be installed': '依赖待安装', + 'Restart Vite hot server': '重启 Vite 热更新服务', + 'Restart Vite hot server tips': '在完成服务重启之前,您可以随时从顶栏右侧的按钮组中找到手动重启服务的按钮。', + 'Manual restart': '手动重启', + 'Restart Now': '立即重启', } diff --git a/web/src/layouts/backend/components/navMenus.vue b/web/src/layouts/backend/components/navMenus.vue index 1ec2c086..292dcaf2 100644 --- a/web/src/layouts/backend/components/navMenus.vue +++ b/web/src/layouts/backend/components/navMenus.vue @@ -1,10 +1,43 @@ + + + + + + + + + + +