fix :Primary Password Masking no longer present (#1614)

This commit is contained in:
pa
2026-01-31 22:06:24 +09:00
parent 14558238c5
commit 1c587e17d2
3 changed files with 9 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
promptCancelText,
promptDismissible,
promptInputValue,
promptInputType,
promptPattern,
promptErrorMessage
} = storeToRefs(modalStore);
@@ -130,7 +131,7 @@
<FormItem>
<FormLabel class="sr-only">Input</FormLabel>
<FormControl>
<Input v-bind="componentField" />
<Input v-bind="componentField" :type="promptInputType" />
</FormControl>
<FormMessage />
</FormItem>

View File

@@ -258,6 +258,7 @@ export const useAuthStore = defineStore('Auth', () => {
.prompt({
title: t('prompt.primary_password.header'),
description: t('prompt.primary_password.description'),
inputType: 'password',
pattern: /[\s\S]{1,32}/
})
.then(async ({ ok, value }) => {
@@ -390,6 +391,7 @@ export const useAuthStore = defineStore('Auth', () => {
.prompt({
title: t('prompt.primary_password.header'),
description: t('prompt.primary_password.description'),
inputType: 'password',
pattern: /[\s\S]{1,32}/
})
.then(({ ok, value }) => {
@@ -532,6 +534,7 @@ export const useAuthStore = defineStore('Auth', () => {
description: t(
'prompt.primary_password.description'
),
inputType: 'password',
pattern: /[\s\S]{1,32}/
})
.then(async ({ ok, value }) => {

View File

@@ -47,6 +47,7 @@ function translate(key, fallback) {
* @property {string=} confirmText
* @property {string=} cancelText
* @property {string=} inputValue
* @property {string=} inputType
* @property {RegExp | string=} pattern
* @property {string=} errorMessage
* @property {boolean=} dismissible
@@ -70,6 +71,7 @@ export const useModalStore = defineStore('Modal', () => {
const promptCancelText = ref('');
const promptDismissible = ref(true);
const promptInputValue = ref('');
const promptInputType = ref('text');
const promptPattern = ref(null);
const promptErrorMessage = ref('');
@@ -181,6 +183,7 @@ export const useModalStore = defineStore('Modal', () => {
promptDescription.value = options.description;
promptDismissible.value = options.dismissible !== false;
promptInputValue.value = inputValueCopy;
promptInputType.value = options.inputType || 'text';
promptPattern.value = options.pattern ?? null;
promptErrorMessage.value =
options.errorMessage ||
@@ -296,6 +299,7 @@ export const useModalStore = defineStore('Modal', () => {
promptCancelText,
promptDismissible,
promptInputValue,
promptInputType,
promptPattern,
promptErrorMessage,