Skip to content

Commit 104f4a9

Browse files
committed
(Embedded Management): Failed to update app secret
1 parent b0afd0f commit 104f4a9

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

frontend/src/views/system/embedded/Page.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,15 @@ const cancelRefresh = (row: any) => {
169169
}
170170
171171
const refresh = (row: any) => {
172-
embeddedApi.secret(row.id).then(() => {
173-
ElMessage.success(t('common.update_success'))
174-
})
175-
cancelRefresh(row)
172+
embeddedApi
173+
.secret(row.id)
174+
.then(() => {
175+
ElMessage.success(t('common.update_success'))
176+
})
177+
.finally(() => {
178+
cancelRefresh(row)
179+
search()
180+
})
176181
}
177182
178183
const search = () => {
@@ -373,11 +378,11 @@ const copyCode = (row: any, key: any = 'app_secret') => {
373378
<template #default="scope">
374379
<div class="user-status-container">
375380
<div
376-
:title="scope.row.showPwd ? scope.row.app_id : pwd"
381+
:title="scope.row.showPwd ? scope.row.app_secret : pwd"
377382
class="ellipsis"
378383
style="max-width: 133px"
379384
>
380-
{{ scope.row.showPwd ? scope.row.app_id : pwd }}
385+
{{ scope.row.showPwd ? scope.row.app_secret : pwd }}
381386
</div>
382387
<el-tooltip
383388
:offset="12"

frontend/src/views/system/embedded/SetUi.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ interface SqlBotForm {
2323
float_icon_drag: boolean
2424
x_val: number
2525
y_val: number
26+
restoreDefaults: boolean
2627
}
2728
2829
const optionsY = [
@@ -73,6 +74,7 @@ const defaultSqlBotForm = reactive<SqlBotForm>({
7374
welcome_desc: t('embedded.data_analysis_now'),
7475
theme: '#1CBA90',
7576
header_font_color: '#1F2329',
77+
restoreDefaults: false,
7678
// logo: '',
7779
// float_icon: '',
7880
})
@@ -170,6 +172,7 @@ const resetSqlBotForm = (reset2Default?: boolean) => {
170172
if (reset2Default) {
171173
logo.value = ''
172174
floatIcon.value = ''
175+
sqlBotForm.restoreDefaults = true
173176
nextTick(() => {
174177
setPageCustomColor(sqlBotForm.theme)
175178
setPageHeaderFontColor(sqlBotForm.header_font_color)

0 commit comments

Comments
 (0)