From fe058b0cabc58ea274ae4b43707cbc252c4ddd80 Mon Sep 17 00:00:00 2001 From: wuchao Date: Wed, 26 Mar 2025 17:28:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=88=86=E4=BA=AB=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=86=E7=A0=81&?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E9=A1=B5=E5=A2=9E=E5=8A=A0=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 78254d5f2fa77228ef1c796afe1798d827199b66) --- front/src/layout_share/index.vue | 54 +++++- front/src/utils/i18n/languages/en-us.js | 3 + front/src/utils/i18n/languages/zh-cn.js | 3 + front/src/views/project/ShareConfig/index.vue | 165 ++++++++++++++++-- mysql-clean.sql | 1 + mysql.sql | 1 + mysql_compat.sql | 1 + .../java/cn/torna/dao/entity/ShareConfig.java | 2 + .../cn/torna/service/ShareConfigService.java | 18 +- .../java/cn/torna/service/UpgradeService.java | 12 +- .../cn/torna/service/dto/ShareConfigDTO.java | 6 + .../web/controller/doc/vo/ShareConfigVO.java | 3 + 12 files changed, 231 insertions(+), 38 deletions(-) diff --git a/front/src/layout_share/index.vue b/front/src/layout_share/index.vue index 8ad3560a..a54d5972 100644 --- a/front/src/layout_share/index.vue +++ b/front/src/layout_share/index.vue @@ -20,14 +20,29 @@ auto-complete="on" @submit.native.prevent > +
{{ shareConfig.shareName }}
- {{ $t('btnOk') }} + @@ -55,16 +70,18 @@ export default { return { shareConfig: { id: '', - type: 0 + type: 0, + shareName: '' }, encryptFormData: { password: '' }, encryptFormRules: { password: [ - { required: true, message: $t('notEmpty'), trigger: 'blur' } + { required: true, message: $t('passwordNotEmpty'), trigger: 'blur' } ] - } + }, + isPasswordVisible: false } }, computed: { @@ -151,6 +168,9 @@ export default { }, handleClickOutside() { this.$store.dispatch('app/closeSideBarView', { withoutAnimation: false }) + }, + togglePasswordVisibility() { + this.isPasswordVisible = !this.isPasswordVisible; } } } @@ -165,6 +185,9 @@ export default { position: relative; height: 100%; width: 100%; + display: flex; + justify-content: center; + align-items: center; &.mobile.openSidebar{ position: fixed; top: 0; @@ -192,6 +215,23 @@ export default { width: 100%; } .encrypt-form { - margin-top: 200px; + margin-top: 0; + width: 600px; + padding: 40px; + box-sizing: border-box; + } + + .share-name { + text-align: center; + margin-bottom: 25px; + font-weight: bold; + font-size: 20px; + min-height: 25px; + } + + .btn-send { + height: 40px; + line-height: 40px; + padding: 0 10px; } diff --git a/front/src/utils/i18n/languages/en-us.js b/front/src/utils/i18n/languages/en-us.js index 271c5324..7fd29e5b 100644 --- a/front/src/utils/i18n/languages/en-us.js +++ b/front/src/utils/i18n/languages/en-us.js @@ -477,6 +477,9 @@ export default { 'valid': 'valid', 'invalid': 'invalid', 'bindingApiDoc': 'Binding interface document', + 'randomPassword': ' Random Password', + 'passwordNotEmpty': 'Password not empty', + 'shareName': 'Share Name', // ---- common end ---- // ---- 组件特有的,key表示组件名称(文件夹名称) ---- RichTextEditor: { diff --git a/front/src/utils/i18n/languages/zh-cn.js b/front/src/utils/i18n/languages/zh-cn.js index 069eb783..95fdd39e 100644 --- a/front/src/utils/i18n/languages/zh-cn.js +++ b/front/src/utils/i18n/languages/zh-cn.js @@ -478,6 +478,9 @@ export default { 'valid': '有效', 'invalid': '无效', 'bindingApiDoc': '绑定接口文档', + 'randomPassword': ' 随机密码', + 'passwordNotEmpty': '密码不能为空', + 'shareName': '分享名称', // ---- common end ---- // ---- 组件特有的,key表示组件名称(文件夹名称) ---- RichTextEditor: { diff --git a/front/src/views/project/ShareConfig/index.vue b/front/src/views/project/ShareConfig/index.vue index 761a9565..8b636d4b 100644 --- a/front/src/views/project/ShareConfig/index.vue +++ b/front/src/views/project/ShareConfig/index.vue @@ -8,23 +8,40 @@ border highlight-current-row > - + + - + - + + + + - - + + @@ -119,6 +137,12 @@ {{ $t('encryption') }} + + + {{ $t('randomPassword') }} + + +