Skip to content

Commit d52a2b6

Browse files
committed
feat(User Management): The initial password is displayed on the new user page.
1 parent a7521f2 commit d52a2b6

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

frontend/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"menu": {
3+
"Dashboard1:": "Default password:{msg}",
34
"add_interface_credentials": "Please add interface credentials",
45
"Data Q&A": "Data Q&A",
56
"Data Connections": "Data Sources",

frontend/src/i18n/ko-KR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"menu": {
3+
"Dashboard1:": "기본 비밀번호:{msg}",
34
"add_interface_credentials": "인터페이스 자격 증명을 추가하십시오",
45
"Data Q&A": "스마트 데이터 조회",
56
"Data Connections": "데이터 소스",

frontend/src/i18n/zh-CN.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"menu": {
3+
"Dashboard1": "默认密码:{msg}",
34
"add_interface_credentials": "请添加接口凭证",
5+
"kkk:": "默认密码:{msg}",
46
"Data Q&A": "智能问数",
57
"Data Connections": "数据源",
68
"Dashboard": "仪表盘",
@@ -716,4 +718,4 @@
716718
"input_account": "请输入账号",
717719
"redirect_2_auth": "正在跳转至 {0} 认证,{1} 秒..."
718720
}
719-
}
721+
}

frontend/src/views/system/user/User.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,19 @@
236236
size="600px"
237237
:before-close="onFormClose"
238238
>
239+
<div style="margin-bottom: 12px" class="down-template">
240+
<span class="icon-span">
241+
<el-icon>
242+
<Icon name="icon_warning_filled"><icon_warning_filled class="svg-icon" /></Icon>
243+
</el-icon>
244+
</span>
245+
<div class="down-template-content" style="align-items: center">
246+
<span>{{ t('menu.Dashboard1', { msg: 'SQLBot@123456' }) }}</span>
247+
<el-button style="margin-left: 4px" size="small" text @click="copyPassword">{{
248+
t('datasource.copy')
249+
}}</el-button>
250+
</div>
251+
</div>
239252
<el-form
240253
ref="termFormRef"
241254
:model="state.form"
@@ -521,6 +534,16 @@ const copyText = () => {
521534
})
522535
}
523536
537+
const copyPassword = () => {
538+
copy('SQLBot@123456')
539+
.then(function () {
540+
ElMessage.success(t('embedded.copy_successful'))
541+
})
542+
.catch(function () {
543+
ElMessage.error(t('embedded.copy_failed'))
544+
})
545+
}
546+
524547
const setButtonRef = (el: any, row: any) => {
525548
row.buttonRef = el
526549
}

0 commit comments

Comments
 (0)