Skip to content

Commit

Permalink
fix(generator): add missing SYNC_* env variables output
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Nov 21, 2023
1 parent d9a90fc commit 05e795b
Showing 1 changed file with 57 additions and 41 deletions.
98 changes: 57 additions & 41 deletions docs/src/components/environment-generator/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ const Generator = ({ setConfiguration }) => {
value: "",
env: "MASTODON_ACCESS_TOKEN",
},
{
name: "enabled",
type: "boolean",
value: true,
hidden: true,
env: "SYNC_MASTODON",
},
],
},
bluesky: {
Expand Down Expand Up @@ -122,6 +129,13 @@ const Generator = ({ setConfiguration }) => {
value: "",
env: "BLUESKY_PASSWORD",
},
{
name: "enabled",
type: "boolean",
value: true,
hidden: true,
env: "SYNC_BLUESKY",
},
],
},
sync: {
Expand Down Expand Up @@ -294,50 +308,52 @@ const Generator = ({ setConfiguration }) => {
) : null}

{category.enabled !== false
? category.fields.map((field) => (
<div key={categorySlug + field.name}>
{field.warning ? (
<Callout.Root
color="gray"
size="1"
style={{ marginBottom: "8px" }}
>
<Callout.Icon>
<InfoCircledIcon />
</Callout.Icon>
<Callout.Text>
<field.warning />
</Callout.Text>
</Callout.Root>
) : null}
? category.fields.map((field) =>
field?.hidden !== true ? (
<div key={categorySlug + field.name}>
{field.warning ? (
<Callout.Root
color="gray"
size="1"
style={{ marginBottom: "8px" }}
>
<Callout.Icon>
<InfoCircledIcon />
</Callout.Icon>
<Callout.Text>
<field.warning />
</Callout.Text>
</Callout.Root>
) : null}

{field.type === "boolean" ? (
<ToggleComponent
field={field}
categorySlug={categorySlug}
category={category}
onChange={onFieldChange}
/>
) : null}
{field.type === "boolean" ? (
<ToggleComponent
field={field}
categorySlug={categorySlug}
category={category}
onChange={onFieldChange}
/>
) : null}

{field.type === "string" || field.type === "number" ? (
<TextComponent
field={field}
type={field.type}
categorySlug={categorySlug}
onChange={onFieldChange}
/>
) : null}
{field.type === "string" || field.type === "number" ? (
<TextComponent
field={field}
type={field.type}
categorySlug={categorySlug}
onChange={onFieldChange}
/>
) : null}

{field.type === "select" ? (
<SelectComponent
field={field}
categorySlug={categorySlug}
onChange={onFieldChange}
/>
) : null}
</div>
))
{field.type === "select" ? (
<SelectComponent
field={field}
categorySlug={categorySlug}
onChange={onFieldChange}
/>
) : null}
</div>
) : null,
)
: null}

{index !== entries.length - 1 ? (
Expand Down

0 comments on commit 05e795b

Please sign in to comment.