mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-07 14:09:59 +00:00
Re-enable keybinding jest test (#2090)
This commit is contained in:
@@ -135,12 +135,14 @@ import { useToast } from 'primevue/usetoast'
|
||||
import { FilterMatchMode } from '@primevue/core/api'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { normalizeI18nKey } from '@/utils/formatUtil'
|
||||
import { useKeybindingService } from '@/services/keybindingService'
|
||||
|
||||
const filters = ref({
|
||||
global: { value: '', matchMode: FilterMatchMode.CONTAINS }
|
||||
})
|
||||
|
||||
const keybindingStore = useKeybindingStore()
|
||||
const keybindingService = useKeybindingService()
|
||||
const commandStore = useCommandStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -204,7 +206,7 @@ watchEffect(() => {
|
||||
function removeKeybinding(commandData: ICommandData) {
|
||||
if (commandData.keybinding) {
|
||||
keybindingStore.unsetKeybinding(commandData.keybinding)
|
||||
keybindingStore.persistUserKeybindings()
|
||||
keybindingService.persistUserKeybindings()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +230,7 @@ function saveKeybinding() {
|
||||
})
|
||||
)
|
||||
if (updated) {
|
||||
keybindingStore.persistUserKeybindings()
|
||||
keybindingService.persistUserKeybindings()
|
||||
}
|
||||
}
|
||||
cancelEdit()
|
||||
@@ -237,7 +239,7 @@ function saveKeybinding() {
|
||||
const toast = useToast()
|
||||
async function resetKeybindings() {
|
||||
keybindingStore.resetKeybindings()
|
||||
await keybindingStore.persistUserKeybindings()
|
||||
await keybindingService.persistUserKeybindings()
|
||||
toast.add({
|
||||
severity: 'info',
|
||||
summary: 'Info',
|
||||
|
||||
Reference in New Issue
Block a user