- Added new automation-related routes and controllers for managing automations. - Introduced automation nodes in the UI with distinct styles and interactions. - Updated sidebar to include navigation for automations. - Enhanced post creation logic to support automation metadata. - Refactored content type and platform enums into types for better type safety. - Added localization for automation-related terms in English, Spanish, and Portuguese. - Improved error handling in various components to accommodate new features.
46 lines
1.3 KiB
Vue
46 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import { Handle, Position } from '@vue-flow/core';
|
|
import { IconWebhook } from '@tabler/icons-vue';
|
|
import { computed } from 'vue';
|
|
|
|
const props = defineProps<{
|
|
data: {
|
|
url?: string;
|
|
method?: string;
|
|
};
|
|
selected?: boolean;
|
|
}>();
|
|
|
|
const summary = computed(() => {
|
|
const method = (props.data.method ?? 'POST').toUpperCase();
|
|
const url = props.data.url || 'https://…';
|
|
return `${method} · ${url}`;
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="automation-node automation-node--wide automation-node--accent-slate"
|
|
:class="{ 'is-selected': selected }"
|
|
>
|
|
<div class="automation-node__header">
|
|
<div class="automation-node__icon-tile automation-node__icon-tile--slate">
|
|
<IconWebhook :size="16" />
|
|
</div>
|
|
<span class="automation-node__title">{{ $t('automations.nodes.webhook') }}</span>
|
|
</div>
|
|
<div class="automation-node__summary" :title="summary">
|
|
{{ summary }}
|
|
</div>
|
|
<Handle
|
|
type="target"
|
|
:position="Position.Left"
|
|
class="!bg-slate-500"
|
|
/>
|
|
<Handle
|
|
type="source"
|
|
:position="Position.Right"
|
|
class="!bg-slate-500"
|
|
/>
|
|
</div>
|
|
</template>
|