-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add interactive profiles configuration (#91)
* feat: Add interactive profiles configuration capability * fix:bugs * fix:Adjust where the editor opens * update profiles manager info * Update README * fix: Icon of webview * fix: author * fix: deps
- Loading branch information
Showing
18 changed files
with
8,283 additions
and
5,464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
export const getCustomWidget = (schema): string => { | ||
if (schema?.type === 'array') { | ||
if (schema?.type === "array") { | ||
// if (schema.items?.type === 'string' && schema?.widget === 'stringList') { | ||
// return 'stringList'; | ||
// } | ||
return 'list'; | ||
return "list"; | ||
} | ||
if (schema?.type === 'string') { | ||
if (schema?.type === "string") { | ||
if (schema?.isFileTransferUrl) { | ||
return 'fileTypeSelect'; | ||
return "file"; | ||
} | ||
if (schema?.format === 'binary') { | ||
return 'file'; | ||
if (schema?.format === "binary") { | ||
return "file"; | ||
} | ||
if (schema?.enum || schema?.enumValueTitles) { | ||
return 'enum'; | ||
return "enum"; | ||
} | ||
return 'string'; | ||
} else if (schema?.type === 'boolean') { | ||
return 'booleanSwitch'; | ||
} else if (schema?.type === 'object' && schema?.additionalProperties) { | ||
return 'map'; | ||
} else if (schema?.type === 'object' && !schema?.properties) { | ||
return 'json'; | ||
} else if (schema?.type === 'any') { | ||
return 'typeSelect'; | ||
return "string"; | ||
} else if (schema?.type === "boolean") { | ||
return "booleanSwitch"; | ||
} else if (schema?.type === "object" && schema?.additionalProperties) { | ||
return "map"; | ||
} else if (schema?.type === "object" && !schema?.properties) { | ||
return "json"; | ||
} else if (schema?.type === "any") { | ||
return "typeSelect"; | ||
} else if ((schema?.ref || schema?.$ref) && !schema?.properties && !schema?.items) { | ||
return 'struct'; | ||
return "struct"; | ||
} | ||
// else if (schema?.type === 'number' || (schema?.type === 'integer' && schema?.format === 'int64')){ | ||
// return "string" | ||
// } | ||
return ''; | ||
}; | ||
return ""; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.