diff --git a/.dockerignore b/.dockerignore
index 5078fcd..def59e5 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,6 +1,6 @@
+**/node_modules
+*/node_modules
node_modules
Dockerfile
-.git
-.husky
-.github
-.vscode
+.*
+*/.*
diff --git a/Dockerfile b/Dockerfile
index f0b6f22..90a0f09 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,11 @@ FROM node:lts-alpine AS builder
COPY ./ /app
WORKDIR /app
-RUN npm install pnpm -g && pnpm install && pnpm run build
+RUN apk add --no-cache git \
+ && npm install pnpm -g \
+ && pnpm install \
+ && pnpm run build \
+ && rm -rf /root/.npm /root/.pnpm-store /usr/local/share/.cache /tmp/*
# service
FROM node:lts-alpine
@@ -13,8 +17,12 @@ COPY /service /app
COPY --from=builder /app/dist /app/public
WORKDIR /app
-RUN npm install pnpm -g && pnpm install
+RUN apk add --no-cache git \
+ && npm install pnpm -g \
+ && pnpm install --only=production \
+ && rm -rf /root/.npm /root/.pnpm-store /usr/local/share/.cache /tmp/*
+
EXPOSE 3002
-CMD ["pnpm", "run", "start"]
\ No newline at end of file
+CMD ["pnpm", "run", "start"]
diff --git a/README.en.md b/README.en.md
index bffae14..6fa93e4 100644
--- a/README.en.md
+++ b/README.en.md
@@ -84,6 +84,12 @@ For all parameter variables, check [here](#docker-parameter-example) or see:
[✓] Formatting and beautifying code-like message types
+[✓] Access rights control
+
+[✓] Data import and export
+
+[✓] Save message to local image
+
[✓] Multilingual interface
[✓] Interface themes
diff --git a/README.md b/README.md
index 32bac58..4f421fb 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,12 @@ API_REVERSE_PROXY=
[✓] 对代码等消息类型的格式化美化处理
+[✓] 访问权限控制
+
+[✓] 数据导入、导出
+
+[✓] 保存消息到本地图片
+
[✓] 界面多语言
[✓] 界面主题
diff --git a/src/components/common/Setting/General.vue b/src/components/common/Setting/General.vue
index 2516cbb..e75b0a9 100644
--- a/src/components/common/Setting/General.vue
+++ b/src/components/common/Setting/General.vue
@@ -51,7 +51,7 @@ const themeOptions: { label: string; key: Theme; icon: string }[] = [
]
const languageOptions: { label: string; key: Language; value: Language }[] = [
- { label: '中文', key: 'zh-CN', value: 'zh-CN' },
+ { label: '简体中文', key: 'zh-CN', value: 'zh-CN' },
{ label: '繁體中文', key: 'zh-TW', value: 'zh-TW' },
{ label: 'English', key: 'en-US', value: 'en-US' },
]
@@ -151,38 +151,41 @@ function handleImportButtonClick(): void {
{{ $t('setting.chatHistory') }}
-
-
-
-
- {{ $t('common.export') }}
-
-
-
-
-
-
-
- {{ $t('common.import') }}
-
-
-
-
-
-
-
-
- {{ $t('common.clear') }}
-
-
- {{ $t('chat.clearHistoryConfirm') }}
-
+
+
+
+
+
+ {{ $t('common.export') }}
+
+
+
+
+
+
+
+ {{ $t('common.import') }}
+
+
+
+
+
+
+
+
+ {{ $t('common.clear') }}
+
+
+ {{ $t('chat.clearHistoryConfirm') }}
+
+
{{ $t('setting.theme') }}
-
+
@@ -195,9 +198,10 @@ function handleImportButtonClick(): void {
{{ $t('setting.language') }}
-
+
@@ -208,7 +212,7 @@ function handleImportButtonClick(): void {
{{ $t('setting.resetUserInfo') }}
-
+
{{ $t('common.reset') }}
diff --git a/src/components/common/Setting/index.vue b/src/components/common/Setting/index.vue
index 3b27464..3200b7c 100644
--- a/src/components/common/Setting/index.vue
+++ b/src/components/common/Setting/index.vue
@@ -31,7 +31,7 @@ const show = computed({
-
+
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 5876836..c9e5bb1 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -16,7 +16,7 @@ export default {
unauthorizedTips: '未经授权,请先进行验证。',
},
chat: {
- placeholder: '来说点什么...(Shift + Enter = 换行)',
+ placeholder: '来说点什么吧...(Shift + Enter = 换行)',
placeholderMobile: '来说点什么...',
copy: '复制',
copied: '复制成功',
diff --git a/src/locales/zh-TW.ts b/src/locales/zh-TW.ts
index 6e08a2d..5412fa7 100644
--- a/src/locales/zh-TW.ts
+++ b/src/locales/zh-TW.ts
@@ -3,9 +3,9 @@ export default {
delete: '刪除',
save: '儲存',
reset: '重設',
- export: '導出',
- import: '導入',
- clear: '清空',
+ export: '匯出',
+ import: '匯入',
+ clear: '清除',
yes: '是',
no: '否',
noData: '暫無資料',
@@ -16,12 +16,12 @@ export default {
unauthorizedTips: '未經授權,請先進行驗證。',
},
chat: {
- placeholder: '來講點什麼...(Shift + Enter = 換行)',
- placeholderMobile: '來講點什麼...',
+ placeholder: '來說點什麼...(Shift + Enter = 換行)',
+ placeholderMobile: '來說點什麼...',
copy: '複製',
copied: '複製成功',
copyCode: '複製代碼',
- clearChat: '清空對話',
+ clearChat: '清除對話',
clearChatConfirm: '是否清空對話?',
exportImage: '儲存對話為圖片',
exportImageConfirm: '是否將對話儲存為圖片?',
@@ -39,6 +39,7 @@ export default {
name: '名稱',
description: '描述',
resetUserInfo: '重設使用者資訊',
+ chatHistory: '紀錄',
theme: '主題',
language: '語言',
api: 'API',
diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue
index ffc1653..2fefff9 100644
--- a/src/views/chat/index.vue
+++ b/src/views/chat/index.vue
@@ -113,6 +113,7 @@ async function onConversation() {
requestOptions: { prompt: message, options: { ...options } },
},
)
+ scrollToBottom()
}
catch (error) {
//