mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Minor tweaks to some flow operations (#13996)
* add template to conditions operation * remove logic related to mode that no longer exists
This commit is contained in:
@@ -21,13 +21,28 @@ export default defineOperationApp({
|
||||
interface: 'input-code',
|
||||
options: {
|
||||
language: 'json',
|
||||
placeholder: `{
|
||||
"$trigger": {
|
||||
"category": {
|
||||
"_eq": "Example"
|
||||
}
|
||||
}
|
||||
}`,
|
||||
placeholder: JSON.stringify(
|
||||
{
|
||||
$trigger: {
|
||||
category: {
|
||||
_eq: 'Example',
|
||||
},
|
||||
},
|
||||
},
|
||||
null,
|
||||
2
|
||||
),
|
||||
template: JSON.stringify(
|
||||
{
|
||||
$trigger: {
|
||||
category: {
|
||||
_eq: 'Example',
|
||||
},
|
||||
},
|
||||
},
|
||||
null,
|
||||
2
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6,20 +6,17 @@ export default defineOperationApp({
|
||||
icon: 'delete',
|
||||
name: '$t:operations.item-delete.name',
|
||||
description: '$t:operations.item-delete.description',
|
||||
overview: ({ mode, collection, key }) => {
|
||||
overview: ({ collection, key }) => {
|
||||
const overviewItems = [
|
||||
{
|
||||
label: '$t:collection',
|
||||
text: collection,
|
||||
},
|
||||
];
|
||||
|
||||
if (mode !== 'query') {
|
||||
overviewItems.push({
|
||||
{
|
||||
label: '$t:operations.item-delete.key',
|
||||
text: key ? toArray(key).join(', ') : '--',
|
||||
});
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
return overviewItems;
|
||||
},
|
||||
@@ -84,16 +81,6 @@ export default defineOperationApp({
|
||||
options: {
|
||||
iconRight: 'vpn_key',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
rule: {
|
||||
mode: {
|
||||
_eq: 'query',
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,20 +6,17 @@ export default defineOperationApp({
|
||||
icon: 'visibility',
|
||||
name: '$t:operations.item-read.name',
|
||||
description: '$t:operations.item-read.description',
|
||||
overview: ({ mode, collection, key }) => {
|
||||
overview: ({ collection, key }) => {
|
||||
const overviewItems = [
|
||||
{
|
||||
label: '$t:collection',
|
||||
text: collection,
|
||||
},
|
||||
];
|
||||
|
||||
if (mode !== 'query') {
|
||||
overviewItems.push({
|
||||
{
|
||||
label: '$t:operations.item-read.key',
|
||||
text: key ? toArray(key).join(', ') : '--',
|
||||
});
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
return overviewItems;
|
||||
},
|
||||
@@ -72,16 +69,6 @@ export default defineOperationApp({
|
||||
options: {
|
||||
iconRight: 'vpn_key',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
rule: {
|
||||
mode: {
|
||||
_eq: 'query',
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,20 +5,17 @@ export default defineOperationApp({
|
||||
icon: 'edit',
|
||||
name: '$t:operations.item-update.name',
|
||||
description: '$t:operations.item-update.description',
|
||||
overview: ({ mode, collection, key }) => {
|
||||
overview: ({ collection, key }) => {
|
||||
const overviewItems = [
|
||||
{
|
||||
label: '$t:collection',
|
||||
text: collection,
|
||||
},
|
||||
];
|
||||
|
||||
if (mode !== 'query') {
|
||||
overviewItems.push({
|
||||
{
|
||||
label: '$t:operations.item-update.key',
|
||||
text: key ? toArray(key).join(', ') : '--',
|
||||
});
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
return overviewItems;
|
||||
},
|
||||
@@ -83,16 +80,6 @@ export default defineOperationApp({
|
||||
options: {
|
||||
iconRight: 'vpn_key',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
rule: {
|
||||
mode: {
|
||||
_eq: 'query',
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -140,16 +127,6 @@ export default defineOperationApp({
|
||||
2
|
||||
),
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
rule: {
|
||||
mode: {
|
||||
_neq: 'query',
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user