ComfyUI/web/assets/KeybindingPanel-DcEfyPZZ.js...

1 line
9.8 KiB
Plaintext
Raw Permalink Normal View History

{"version":3,"file":"KeybindingPanel-DcEfyPZZ.js","sources":["../../src/components/dialog/content/setting/keybinding/KeyComboDisplay.vue","../../src/components/dialog/content/setting/KeybindingPanel.vue"],"sourcesContent":["<template>\n <span>\n <template v-for=\"(sequence, index) in keySequences\" :key=\"index\">\n <Tag :severity=\"isModified ? 'info' : 'secondary'\">\n {{ sequence }}\n </Tag>\n <span v-if=\"index < keySequences.length - 1\" class=\"px-2\">+</span>\n </template>\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport Tag from 'primevue/tag'\nimport { KeyComboImpl } from '@/stores/keybindingStore'\nimport { computed } from 'vue'\n\nconst props = withDefaults(\n defineProps<{\n keyCombo: KeyComboImpl\n isModified: boolean\n }>(),\n {\n isModified: false\n }\n)\n\nconst keySequences = computed(() => props.keyCombo.getKeySequences())\n</script>\n","<template>\n <div class=\"keybinding-panel\">\n <DataTable\n :value=\"commandsData\"\n v-model:selection=\"selectedCommandData\"\n :global-filter-fields=\"['id']\"\n :filters=\"filters\"\n selectionMode=\"single\"\n stripedRows\n :pt=\"{\n header: 'px-0'\n }\"\n >\n <template #header>\n <SearchBox\n v-model=\"filters['global'].value\"\n :placeholder=\"$t('searchKeybindings') + '...'\"\n />\n </template>\n <Column field=\"actions\" header=\"\">\n <template #body=\"slotProps\">\n <div class=\"actions invisible flex flex-row\">\n <Button\n icon=\"pi pi-pencil\"\n class=\"p-button-text\"\n @click=\"editKeybinding(slotProps.data)\"\n />\n <Button\n icon=\"pi pi-trash\"\n class=\"p-button-text p-button-danger\"\n @click=\"removeKeybinding(slotProps.data)\"\n :disabled=\"!slotProps.data.keybinding\"\n />\n </div>\n </template>\n </Column>\n <Column\n field=\"id\"\n header=\"Command ID\"\n sortable\n class=\"max-w-64 2xl:max-w-full\"\n >\n <template #body=\"slotProps\">\n <div\n class=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n :title=\"slotProps.data.id\"\n >\n {{ slotProps.data.id }}\n </div>\n </template>\n </Column>\n <Column field=\"keybinding\" header=\"Keybinding\">\n <template #body=\"slotProps\">\n <KeyComboDisplay\n v-if=\"slotProps.data.keybinding\"\n :keyCombo=\"slotProps.data.keybinding.combo\"\n :isModified=\"\n keybindingStore.isCommandKeybindingModified(slotProps.data.id)\n \"\n />\n <span v-else>-</span>\n </template>\n </Column>\n </DataTable>\n\n <Dialog\n class=\"min-w-96\"\n v-model:visible=\"editDialogVisible\"\n modal\n :header=\"currentEditingCommand?.id\"\n @hide=\"cancelEdit\"\n >\n <div>\n <InputText\n class=\"mb-2 text-center\"\n ref=\"keybindingInput\"\n :modelValue=\"newBindingKeyCombo?.toString() ?? ''\"\n placeholder=\"Press keys for new binding\"\n @keydown.stop.prevent=\"captureKeybinding\"\n autocomplete=\"off\"\n fluid\n :invalid=\"!!existingKeybindingOnCombo\"\n />\n <Message v-if=\"existingKeybindingOnCombo\" severity=\"error\">\n Keybinding already exists on\n <Tag\n severity=\"secondary\"\n :value=\"existingKeybindingOnCombo.commandId\"\n />\n </Message>\n </div>\n <template #footer>\n <Button\n label=\"Save\"\n icon=\"pi pi-check\"\n @click=\"saveKeybinding\"\n :disabled=\"!!existingKeybindingOnCombo\"\n autofocus\n />\n </template>\n </Dialog>\n <Button\n class=\"mt-4\"\n :label=\"$t('reset')\"\n v-tooltip