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
|
||||
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 0;
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,10 @@ export default function InputGlobalComponent({
|
|||
!globalVariablesEntries.includes(data.node?.template[name].value) &&
|
||||
data.node?.template[name].load_from_db
|
||||
) {
|
||||
onChange("");
|
||||
setDb(false);
|
||||
setTimeout(() => {
|
||||
onChange("");
|
||||
setDb(false);
|
||||
}, 100);
|
||||
}
|
||||
}, [globalVariablesEntries]);
|
||||
|
||||
|
|
@ -47,9 +49,11 @@ export default function InputGlobalComponent({
|
|||
!data.node?.template[name].value &&
|
||||
data.node?.template[name].display_name
|
||||
) {
|
||||
if (unavaliableFields[data.node?.template[name].display_name!]) {
|
||||
setDb(true);
|
||||
onChange(unavaliableFields[data.node?.template[name].display_name!]);
|
||||
if (unavaliableFields[data.node?.template[name].display_name!] && !disabled) {
|
||||
setTimeout(() => {
|
||||
setDb(true);
|
||||
onChange(unavaliableFields[data.node?.template[name].display_name!]);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}, [unavaliableFields]);
|
||||
|
|
@ -131,7 +135,7 @@ export default function InputGlobalComponent({
|
|||
)}
|
||||
selectedOption={
|
||||
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
|
||||
: ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -821,6 +821,18 @@ export const defaultShortcuts = [
|
|||
name: "Delete",
|
||||
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([
|
||||
{
|
||||
name: "Advanced Settings",
|
||||
name: "Advanced Settings Component",
|
||||
shortcut: advancedShortcut,
|
||||
},
|
||||
{
|
||||
name: "Minimize",
|
||||
name: "Minimize Component",
|
||||
shortcut: minizmizeShortcut,
|
||||
},
|
||||
{
|
||||
name: "Code",
|
||||
name: "Code Component",
|
||||
shortcut: codeShortcut,
|
||||
},
|
||||
{
|
||||
name: "Copy",
|
||||
name: "Copy Component",
|
||||
shortcut: copyShortcut,
|
||||
},
|
||||
{
|
||||
name: "Duplicate",
|
||||
name: "Duplicate Component",
|
||||
shortcut: duplicateShortcut,
|
||||
},
|
||||
{
|
||||
name: "Share",
|
||||
name: "Share Component",
|
||||
shortcut: shareShortcut,
|
||||
},
|
||||
{
|
||||
name: "Docs",
|
||||
name: "Docs Component",
|
||||
shortcut: docsShortcut,
|
||||
},
|
||||
{
|
||||
name: "Save",
|
||||
name: "Save Component",
|
||||
shortcut: saveShortcut,
|
||||
},
|
||||
{
|
||||
name: "Delete",
|
||||
name: "Delete Component",
|
||||
shortcut: deleteShortcut,
|
||||
},
|
||||
]);
|
||||
|
||||
const [flowRowData, setFlowRowData] = useState([
|
||||
{
|
||||
name: "Open Playground",
|
||||
shortcut: interactionShortcut,
|
||||
|
|
@ -121,19 +118,13 @@ export default function ShortcutsPage() {
|
|||
/>
|
||||
</h2>
|
||||
<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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid gap-6 pb-8">
|
||||
<Card x-chunk="dashboard-04-chunk-2">
|
||||
<CardHeader>
|
||||
<CardTitle>Nodes</CardTitle>
|
||||
<CardDescription>
|
||||
Shortcuts relating to the nodes in the workspace.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<Card x-chunk="dashboard-04-chunk-2" className="pt-4">
|
||||
<CardContent>
|
||||
<div className="w-full flex justify-end align-end mb-4">
|
||||
<div className="">
|
||||
|
|
@ -177,7 +168,7 @@ export default function ShortcutsPage() {
|
|||
domLayout="autoHeight"
|
||||
pagination={false}
|
||||
columnDefs={colDefs}
|
||||
rowData={flowRowData}
|
||||
rowData={nodesRowData}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue