diff --git a/ui/src/views/application-overview/component/LimitDialog.vue b/ui/src/views/application-overview/component/LimitDialog.vue index c5e643b1f..4acbf4dd0 100644 --- a/ui/src/views/application-overview/component/LimitDialog.vue +++ b/ui/src/views/application-overview/component/LimitDialog.vue @@ -7,12 +7,6 @@ width="650" > - @@ -30,50 +24,7 @@ $t('views.applicationOverview.appInfo.LimitDialog.timesDays') }} - - - - - - - - - + ({ white_active: true, white_list: '', authentication_value: '', - authentication: false + authentication: false, }) const dialogVisible = ref(false) @@ -133,7 +82,7 @@ watch(dialogVisible, (bool) => { form.value = { access_num: 0, white_active: true, - white_list: '' + white_list: '', } } }) @@ -156,7 +105,7 @@ const submit = async (formEl: FormInstance | undefined) => { white_active: form.value.white_active, access_num: form.value.access_num, authentication: form.value.authentication, - authentication_value: form.value.authentication_value + authentication_value: form.value.authentication_value, } applicationApi.putAccessToken(id as string, obj, loading).then((res) => { emit('refresh') @@ -167,30 +116,8 @@ const submit = async (formEl: FormInstance | undefined) => { } }) } -function generateAuthenticationValue(length: number = 10) { - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' - const randomValues = new Uint8Array(length) - window.crypto.getRandomValues(randomValues) - return Array.from(randomValues) - .map((value) => chars[value % chars.length]) - .join('') -} -function refreshAuthentication() { - form.value.authentication_value = generateAuthenticationValue() -} - -function firstGeneration() { - if (form.value.authentication && !form.value.authentication_value) { - form.value.authentication_value = generateAuthenticationValue() - } -} - defineExpose({ open }) diff --git a/ui/src/views/application-overview/index.vue b/ui/src/views/application-overview/index.vue index 7740152fe..831799b21 100644 --- a/ui/src/views/application-overview/index.vue +++ b/ui/src/views/application-overview/index.vue @@ -1,7 +1,6 @@ + diff --git a/ui/src/views/application/index.vue b/ui/src/views/application/index.vue index bbf611bf9..6d07acc87 100644 --- a/ui/src/views/application/index.vue +++ b/ui/src/views/application/index.vue @@ -3,6 +3,7 @@