mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 06:30:50 +01:00
fixed unsaved changes
This commit is contained in:
24
src/components/haex/pass/group/composables.ts
Normal file
24
src/components/haex/pass/group/composables.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import type { SelectHaexPasswordsGroups } from '~~/src-tauri/database/schemas/vault'
|
||||
|
||||
export const usePasswordGroup = () => {
|
||||
const areItemsEqual = (
|
||||
groupA: unknown | unknown[] | null,
|
||||
groupB: unknown | unknown[] | null,
|
||||
) => {
|
||||
if (groupA === null && groupB === null) return true
|
||||
|
||||
if (Array.isArray(groupA) && Array.isArray(groupB)) {
|
||||
console.log('compare object arrays', groupA, groupB)
|
||||
if (groupA.length === groupB.length) return true
|
||||
|
||||
return groupA.some((group, index) => {
|
||||
return areObjectsEqual(group, groupA[index])
|
||||
})
|
||||
}
|
||||
return areObjectsEqual(groupA, groupB)
|
||||
}
|
||||
|
||||
return {
|
||||
areItemsEqual,
|
||||
}
|
||||
}
|
||||
@ -52,7 +52,7 @@
|
||||
class="btn-primary btn-outline flex-1-1 min-w-40"
|
||||
>
|
||||
<Icon name="mdi:plus" />
|
||||
<p class="hidden sm:inline-flex">{{ t('add') }}</p>
|
||||
<p class="hidden sm:inline-block">{{ t('add') }}</p>
|
||||
</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user