Merge feature/ui_table into shortcuts_settings
This commit is contained in:
commit
c37c78214f
4 changed files with 39 additions and 29 deletions
|
|
@ -173,7 +173,10 @@ export default function InputComponent({
|
||||||
>
|
>
|
||||||
<Command
|
<Command
|
||||||
filter={(value, search) => {
|
filter={(value, search) => {
|
||||||
if (value.toLowerCase().includes(search.toLowerCase()) || value.includes("doNotFilter-"))
|
if (
|
||||||
|
value.toLowerCase().includes(search.toLowerCase()) ||
|
||||||
|
value.includes("doNotFilter-")
|
||||||
|
)
|
||||||
return 1; // ensures items arent filtered
|
return 1; // ensures items arent filtered
|
||||||
return 0;
|
return 0;
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,10 @@ export default function InputGlobalComponent({
|
||||||
!globalVariablesEntries.includes(data.node?.template[name].value) &&
|
!globalVariablesEntries.includes(data.node?.template[name].value) &&
|
||||||
data.node?.template[name].load_from_db
|
data.node?.template[name].load_from_db
|
||||||
) {
|
) {
|
||||||
onChange("");
|
setTimeout(() => {
|
||||||
setDb(false);
|
onChange("");
|
||||||
|
setDb(false);
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}, [globalVariablesEntries]);
|
}, [globalVariablesEntries]);
|
||||||
|
|
||||||
|
|
@ -47,9 +49,11 @@ export default function InputGlobalComponent({
|
||||||
!data.node?.template[name].value &&
|
!data.node?.template[name].value &&
|
||||||
data.node?.template[name].display_name
|
data.node?.template[name].display_name
|
||||||
) {
|
) {
|
||||||
if (unavaliableFields[data.node?.template[name].display_name!]) {
|
if (unavaliableFields[data.node?.template[name].display_name!] && !disabled) {
|
||||||
setDb(true);
|
setTimeout(() => {
|
||||||
onChange(unavaliableFields[data.node?.template[name].display_name!]);
|
setDb(true);
|
||||||
|
onChange(unavaliableFields[data.node?.template[name].display_name!]);
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [unavaliableFields]);
|
}, [unavaliableFields]);
|
||||||
|
|
@ -131,7 +135,7 @@ export default function InputGlobalComponent({
|
||||||
)}
|
)}
|
||||||
selectedOption={
|
selectedOption={
|
||||||
data?.node?.template[name].load_from_db &&
|
data?.node?.template[name].load_from_db &&
|
||||||
globalVariablesEntries.includes(data?.node?.template[name].value??"")
|
globalVariablesEntries.includes(data?.node?.template[name].value ?? "")
|
||||||
? data?.node?.template[name].value
|
? data?.node?.template[name].value
|
||||||
: ""
|
: ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -821,6 +821,18 @@ export const defaultShortcuts = [
|
||||||
name: "Delete",
|
name: "Delete",
|
||||||
shortcut: "Backspace"
|
shortcut: "Backspace"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Open playground",
|
||||||
|
shortcut: "Ctrl K"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Undo",
|
||||||
|
shortcut: "Ctrl Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Redo",
|
||||||
|
shortcut: "Ctrl Y"
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export const unavailableShortcutss = ["Ctrl + Shift + a", "Ctrl + q", "Ctrl + Shift + u", "Ctrl + c", "Ctrl + d", "Ctrl + Shift + s", "Ctrl + Shift + d", "Ctrl + s", "Backspace"];
|
export const unavailableShortcutss = ["Ctrl + Shift + a", "Ctrl + q", "Ctrl + Shift + u", "Ctrl + c", "Ctrl + d", "Ctrl + Shift + s", "Ctrl + Shift + d", "Ctrl + s", "Backspace", "Ctrl + K", "Ctrl + Z", "Ctrl + Y"];
|
||||||
|
|
|
||||||
|
|
@ -50,44 +50,41 @@ export default function ShortcutsPage() {
|
||||||
|
|
||||||
const [nodesRowData, setNodesRowData] = useState([
|
const [nodesRowData, setNodesRowData] = useState([
|
||||||
{
|
{
|
||||||
name: "Advanced Settings",
|
name: "Advanced Settings Component",
|
||||||
shortcut: advancedShortcut,
|
shortcut: advancedShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Minimize",
|
name: "Minimize Component",
|
||||||
shortcut: minizmizeShortcut,
|
shortcut: minizmizeShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Code",
|
name: "Code Component",
|
||||||
shortcut: codeShortcut,
|
shortcut: codeShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Copy",
|
name: "Copy Component",
|
||||||
shortcut: copyShortcut,
|
shortcut: copyShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Duplicate",
|
name: "Duplicate Component",
|
||||||
shortcut: duplicateShortcut,
|
shortcut: duplicateShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Share",
|
name: "Share Component",
|
||||||
shortcut: shareShortcut,
|
shortcut: shareShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Docs",
|
name: "Docs Component",
|
||||||
shortcut: docsShortcut,
|
shortcut: docsShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Save",
|
name: "Save Component",
|
||||||
shortcut: saveShortcut,
|
shortcut: saveShortcut,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Delete",
|
name: "Delete Component",
|
||||||
shortcut: deleteShortcut,
|
shortcut: deleteShortcut,
|
||||||
},
|
},
|
||||||
]);
|
|
||||||
|
|
||||||
const [flowRowData, setFlowRowData] = useState([
|
|
||||||
{
|
{
|
||||||
name: "Open Playground",
|
name: "Open Playground",
|
||||||
shortcut: interactionShortcut,
|
shortcut: interactionShortcut,
|
||||||
|
|
@ -121,19 +118,13 @@ export default function ShortcutsPage() {
|
||||||
/>
|
/>
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">
|
||||||
Customize, manage and create shortcuts for quick access to
|
Manage Shortcuts for quick access to
|
||||||
frequently used actions.
|
frequently used actions.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid gap-6 pb-8">
|
<div className="grid gap-6 pb-8">
|
||||||
<Card x-chunk="dashboard-04-chunk-2">
|
<Card x-chunk="dashboard-04-chunk-2" className="pt-4">
|
||||||
<CardHeader>
|
|
||||||
<CardTitle>Nodes</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
Shortcuts relating to the nodes in the workspace.
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<div className="w-full flex justify-end align-end mb-4">
|
<div className="w-full flex justify-end align-end mb-4">
|
||||||
<div className="">
|
<div className="">
|
||||||
|
|
@ -177,7 +168,7 @@ export default function ShortcutsPage() {
|
||||||
domLayout="autoHeight"
|
domLayout="autoHeight"
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columnDefs={colDefs}
|
columnDefs={colDefs}
|
||||||
rowData={flowRowData}
|
rowData={nodesRowData}
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue