Skip to content

Commit

Permalink
feat: add description and default fields to the plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-tymoshenko committed Dec 5, 2023
1 parent c175a84 commit 0cd086d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/renderer/src/components/plugins/PluginEnvVarsForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ function PluginEnvVarsForm ({
title={pluginFound.form[element].path}
titleColor={WHITE}
key={element}
helper={pluginFound.form[element].description || ''}
>
<Forms.Input
placeholder='Env variable example'
placeholder=''
name={element}
borderColor={WHITE}
value={pluginFound.form[element].value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function ConfigureService ({ service }) {
key={element}
>
<Forms.Input
placeholder='Env variable example'
placeholder=''
name={element}
borderColor={WHITE}
value={form[element]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function TemplateEnvVarsForm ({
key={element}
>
<Forms.Input
placeholder='Env variable example'
placeholder=''
name={element}
borderColor={WHITE}
value={configuredServiceFound.form[element].value}
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ export const generateForm = (services, addUpdatedAt = true) => {

if (plugin.envVars.length > 0) {
plugin.envVars.forEach(envVar => {
const { name: envName, type, default: envDefault, path } = envVar
const { name: envName, type, default: envDefault, path, description } = envVar
const value = envDefault || ''
pluginForm[envName] = {
path,
value,
type
type,
description
}
pluginValidations[`${envName}Valid`] = value !== ''
pluginFormErrors[envName] = ''
Expand Down

0 comments on commit 0cd086d

Please sign in to comment.