This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin5 in repository https://gitbox.apache.org/repos/asf/kylin.git
commit fbe00ccb6ff4591062ce6c8311b75c7f7b478929 Author: Qian Xia <lauraxiaq...@gmail.com> AuthorDate: Tue Jun 6 11:24:56 2023 +0800 KYLIN-5547 change the style of recognize aggregate modal --- .../RecognizeAggregateModal.vue | 22 ++++++++++++++++------ .../common/RecognizeAggregateModal/locales.js | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue b/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue index 8f0928880d..35192396dd 100644 --- a/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue +++ b/kystudio/src/components/common/RecognizeAggregateModal/RecognizeAggregateModal.vue @@ -24,12 +24,13 @@ </div> <AceEditor :key="isShow" :placeholder="'123'" class="text-input" ref="editorRef" :value="form.text" @input="handleInputText" /> <div class="actions"> - <el-tooltip :content="$t('dexecute')" placement="left"> - <el-button icon-button class="recognize" size="small" type="primary" icon="el-icon-caret-right" :disabled="!form.text" @click="handleRecognize" /> + <el-tooltip placement="left"> + <div slot="content">{{$t('dexecute')}}<span class="accelerator-key">{{$t('acceleratorKey')}}</span></div> + <el-button icon-button class="recognize" size="small" type="primary" icon="el-ksd-n-icon-play-filled" :disabled="!form.text" @click="handleRecognize" /> </el-tooltip> </div> </div> - <div class="recognize-results"> + <div class="recognize-results" v-loading="loadingRecognize"> <template v-if="form.dimensions.length"> <div class="results-header"> {{$tc('selectedDimensionCount', selectedDimensionCount, { count: selectedDimensionCount })}} @@ -67,7 +68,7 @@ {{$t('kylinLang.common.cancel')}} </el-button> <el-button type="primary" size="medium" :disabled="!selectedDimensionCount" @click="handleSubmit"> - {{$t('kylinLang.common.submit')}} + {{$t('kylinLang.common.save')}} </el-button> </div> </el-dialog> @@ -126,6 +127,8 @@ }) export default class RecognizeAggregateModal extends Vue { ALERT_STATUS = ALERT_STATUS + loadingRecognize = false + @Watch('$lang') onLocaleChanged () { this.updatePlaceHolder() @@ -279,8 +282,8 @@ this.$nextTick(() => refreshEditor(editor)) } handleDexecute (event) { - const { metaKey, key, keyCode } = event - if (metaKey && (keyCode === 13 || key === 'Enter')) { + const { metaKey, ctrlKey, key, keyCode } = event + if ((metaKey || ctrlKey) && (keyCode === 13 || key === 'Enter')) { this.handleRecognize() } } @@ -301,6 +304,7 @@ const dimensions = [] this.clearupErrors() let formattedText = '' + this.loadingRecognize = true for (const text of form.text.replace(/\n*/g, '').split(/,\n*/g)) { const columnText = text.trim().toLocaleUpperCase() if (columnText) { @@ -331,6 +335,9 @@ this.setModalForm({ text: formattedText, dimensions }) this.$nextTick(() => { this.showErrors() + setTimeout(() => { + this.loadingRecognize = false + }, 500) }) } handlePrevious () { @@ -571,5 +578,8 @@ margin-left: 15px; } } + .accelerator-key { + color: @text-disabled-color; + } </style> \ No newline at end of file diff --git a/kystudio/src/components/common/RecognizeAggregateModal/locales.js b/kystudio/src/components/common/RecognizeAggregateModal/locales.js index 31ebef97e2..c60a41ecea 100644 --- a/kystudio/src/components/common/RecognizeAggregateModal/locales.js +++ b/kystudio/src/components/common/RecognizeAggregateModal/locales.js @@ -10,7 +10,7 @@ export default { selectedDimensionCount: 'Select {count} results | Select {count} result | Select {count} results', usedDimensionCount: '{count} already exists', inputPlaceholder1: 'Please paste the text, separated by "," to identify the selected column.', - inputPlaceholder2: 'Example: CUSTOMER.C_CUSTKEY,CUSTOMER.C_CUSTKEY', + inputPlaceholder2: 'Example: CUSTOMER.C_CUSTKEY, CUSTOMER.C_CUSTKEY', inputPlaceholderTooltip1: 'Method 1: Enter the formula A1 & "," on a new column in Excel, enter and drag the bottom right corner of the cell to add in bulk;', inputPlaceholderTooltip2: 'Method 2: Select all the cells that need to added in bulk, right-click and select the cell format (shortcut cmd & ctrl + 1). Select "Custom", enter English format General "," or @ "," in the type, confirm and add in bulk.', inputPlaceholderTooltipTrigger: 'Not sure how to batch add characters?',