Implement password change function

This commit is contained in:
2025-07-16 08:42:09 +02:00
parent 37f381c884
commit f518723a0e
10 changed files with 219 additions and 48 deletions

View File

@ -63,6 +63,7 @@ import { ref } from 'vue'
import { generateRandomPassword } from '@/api/password'
import AddSecretsToClients from '@/components/secrets/AddSecretToClients.vue'
import ClientSelectDropdown from '@/components/clients/ClientSelectDropdown.vue'
import { setFieldValidation } from '@/api/validation'
const props = defineProps<{ group?: string }>()
@ -77,12 +78,6 @@ const secretLength = ref(8)
const autoGenerate = ref(false)
const selectedClients = ref<string[]>()
function setFieldValidation(field: Ref<HTMLSlInputElement>, errorMessage: string = '') {
// Set validation on a field
field.value?.setCustomValidity(errorMessage)
field.value?.reportValidity()
}
function generatePassword() {
const password = generateRandomPassword(secretLength.value)
secretValue.value = password