|
|
@ -2,6 +2,7 @@ |
|
|
|
import { useMagicKeys, whenever } from '@vueuse/core' |
|
|
|
import { useMagicKeys, whenever } from '@vueuse/core' |
|
|
|
import { commandScore } from './command-score' |
|
|
|
import { commandScore } from './command-score' |
|
|
|
import type { CommandPaletteType } from '~/lib/types' |
|
|
|
import type { CommandPaletteType } from '~/lib/types' |
|
|
|
|
|
|
|
import LinkedItems from '../virtual-cell/components/LinkedItems.vue' |
|
|
|
|
|
|
|
|
|
|
|
interface CmdAction { |
|
|
|
interface CmdAction { |
|
|
|
id: string |
|
|
|
id: string |
|
|
@ -10,7 +11,8 @@ interface CmdAction { |
|
|
|
parent?: string |
|
|
|
parent?: string |
|
|
|
handler?: Function |
|
|
|
handler?: Function |
|
|
|
scopePayload?: any |
|
|
|
scopePayload?: any |
|
|
|
icon?: VNode | string |
|
|
|
icon?: VNode | string | Record<string, any> |
|
|
|
|
|
|
|
iconType?: string |
|
|
|
keywords?: string[] |
|
|
|
keywords?: string[] |
|
|
|
section?: string |
|
|
|
section?: string |
|
|
|
is_default?: number | null |
|
|
|
is_default?: number | null |
|
|
@ -85,6 +87,7 @@ const nestedScope = computed(() => { |
|
|
|
id: parent, |
|
|
|
id: parent, |
|
|
|
label: parentEl?.title, |
|
|
|
label: parentEl?.title, |
|
|
|
icon: parentEl?.icon, |
|
|
|
icon: parentEl?.icon, |
|
|
|
|
|
|
|
iconType: parentEl?.iconType, |
|
|
|
iconColor: parent.startsWith('ws-') ? parentEl?.iconColor : null, |
|
|
|
iconColor: parent.startsWith('ws-') ? parentEl?.iconColor : null, |
|
|
|
}) |
|
|
|
}) |
|
|
|
parent = parentEl?.parent || 'root' |
|
|
|
parent = parentEl?.parent || 'root' |
|
|
@ -414,13 +417,15 @@ defineExpose({ |
|
|
|
<GeneralWorkspaceIcon |
|
|
|
<GeneralWorkspaceIcon |
|
|
|
v-if="el.icon && el.id.startsWith('ws')" |
|
|
|
v-if="el.icon && el.id.startsWith('ws')" |
|
|
|
:workspace="{ |
|
|
|
:workspace="{ |
|
|
|
|
|
|
|
title: el.label, |
|
|
|
id: el.id.split('-')[1], |
|
|
|
id: el.id.split('-')[1], |
|
|
|
meta: { |
|
|
|
meta: { |
|
|
|
color: el.iconColor, |
|
|
|
color: el.iconColor, |
|
|
|
|
|
|
|
icon: el.icon, |
|
|
|
|
|
|
|
iconType: el.iconType, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}" |
|
|
|
}" |
|
|
|
hide-label |
|
|
|
size="medium" |
|
|
|
size="small" |
|
|
|
|
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<component |
|
|
|
<component |
|
|
@ -501,13 +506,16 @@ defineExpose({ |
|
|
|
<GeneralWorkspaceIcon |
|
|
|
<GeneralWorkspaceIcon |
|
|
|
v-if="item.data.icon && item.data.id.startsWith('ws')" |
|
|
|
v-if="item.data.icon && item.data.id.startsWith('ws')" |
|
|
|
:workspace="{ |
|
|
|
:workspace="{ |
|
|
|
|
|
|
|
title: item.data.title, |
|
|
|
id: item.data.id.split('-')[2], |
|
|
|
id: item.data.id.split('-')[2], |
|
|
|
meta: { |
|
|
|
meta: { |
|
|
|
color: item.data?.iconColor, |
|
|
|
color: item.data?.iconColor, |
|
|
|
|
|
|
|
icon: item.data?.icon, |
|
|
|
|
|
|
|
iconType: item.data?.iconType, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}" |
|
|
|
}" |
|
|
|
class="mr-2" |
|
|
|
class="mr-2" |
|
|
|
size="small" |
|
|
|
size="medium" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<template v-else-if="item.data.section === 'Bases' || item.data.icon === 'project'"> |
|
|
|
<template v-else-if="item.data.section === 'Bases' || item.data.icon === 'project'"> |
|
|
|
<GeneralBaseIconColorPicker |
|
|
|
<GeneralBaseIconColorPicker |
|
|
|