feat: enhance search functionality by including cipher ID in search text

This commit is contained in:
shuaiplus
2026-05-14 10:52:11 +08:00
parent 7312086f92
commit f64abaa75d
+2 -1
View File
@@ -306,9 +306,10 @@ export default function VaultPage(props: VaultPageProps) {
const name = String(cipher.decName || cipher.name || ''); const name = String(cipher.decName || cipher.name || '');
const username = String(cipher.login?.decUsername || ''); const username = String(cipher.login?.decUsername || '');
const uri = firstCipherUri(cipher); const uri = firstCipherUri(cipher);
const cipherId = String(cipher.id || '').trim();
meta.set(cipher.id, { meta.set(cipher.id, {
name, name,
searchText: `${name}\n${username}\n${uri}`.toLowerCase(), searchText: `${cipherId}\n${cipherId.replace(/-/g, '')}\n${name}\n${username}\n${uri}`.toLowerCase(),
firstUri: uri, firstUri: uri,
typeKey: cipherTypeKey(Number(cipher.type || 1)), typeKey: cipherTypeKey(Number(cipher.type || 1)),
sortTime: sortTimeValue(cipher), sortTime: sortTimeValue(cipher),