mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 18:10:08 +00:00
## Summary Remove the mix of class based and component style icons in favor of just [classes](https://iconify.design/docs/usage/css/tailwind/tailwind4/#basic-usage). ## Changes - **What**: Migrate existing lucide icons ## Review Focus What differs between the icons before and now? ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5947-Style-Standardize-icon-use-Part-1-2846d73d365081bfa66ceb6bdaa9ff02) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
40 lines
1.0 KiB
Vue
40 lines
1.0 KiB
Vue
<template>
|
|
<SidebarIcon
|
|
:tooltip="tooltipText"
|
|
:selected="isShortcutsPanelVisible"
|
|
@click="toggleShortcutsPanel"
|
|
>
|
|
<template #icon>
|
|
<i class="icon-[lucide--keyboard]" />
|
|
</template>
|
|
</SidebarIcon>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import { useCommandStore } from '@/stores/commandStore'
|
|
import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
|
|
|
|
import SidebarIcon from './SidebarIcon.vue'
|
|
|
|
const { t } = useI18n()
|
|
const bottomPanelStore = useBottomPanelStore()
|
|
const commandStore = useCommandStore()
|
|
const command = commandStore.getCommand('Workspace.ToggleBottomPanel.Shortcuts')
|
|
const { formatKeySequence } = commandStore
|
|
|
|
const isShortcutsPanelVisible = computed(
|
|
() => bottomPanelStore.activePanel === 'shortcuts'
|
|
)
|
|
|
|
const tooltipText = computed(
|
|
() => `${t('shortcuts.keyboardShortcuts')} (${formatKeySequence(command)})`
|
|
)
|
|
|
|
const toggleShortcutsPanel = () => {
|
|
bottomPanelStore.togglePanel('shortcuts')
|
|
}
|
|
</script>
|