Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
2eha0 committed Oct 31, 2024
1 parent f64c87a commit 01026eb
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,22 @@ const modifiedCustomPlugins = computed((): PluginType[] => {
: customPlugins
})
// const modifiedCustomPlugins = ref<PluginType[]>([])
// window['setCards'] = (hasCards: boolean) => {
// if (hasCards) {
// modifiedCustomPlugins.value = [{
// id: 'custom-plugin-create',
// name: t('plugins.select.tabs.custom.create.name'),
// available: true,
// group: PluginGroup.CUSTOM_PLUGINS,
// description: t('plugins.select.tabs.custom.create.description'),
// }]
// } else {
// modifiedCustomPlugins.value = []
// }
// }
const openDeleteModal = ref(false)
const selectedPlugin = ref<{ name: string, id: string } | null>(null)
Expand Down Expand Up @@ -204,7 +220,7 @@ const collapsedGroupStyles = computed((): Record<string, string> => {
const showCollapseTrigger = ref<boolean>(false) // don't display a trigger if all plugins will already be visible
const handleResize = (): void => {
tallestPluginCardHeight.value = getTallestPluginCardHeight(pluginCardRef.value!)
tallestPluginCardHeight.value = !pluginCardRef.value?.length ? 0 : getTallestPluginCardHeight(pluginCardRef.value)
setToggleVisibility()
}
Expand All @@ -220,7 +236,10 @@ onMounted(async () => {
window?.addEventListener('resize', handleResize)
})
watch(modifiedCustomPlugins, () => {
watch(modifiedCustomPlugins, (newValue) => {
if (!newValue.value?.length) {
return
}
handleResize()
}, {
immediate: true,
Expand Down

0 comments on commit 01026eb

Please sign in to comment.