mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-06 01:41:48 +02:00
Enhancement: Better content type creation for Astro #704
This commit is contained in:
@@ -31,6 +31,7 @@ export const StepsToGetStarted: React.FunctionComponent<IStepsToGetStartedProps>
|
||||
const [framework, setFramework] = useState<string | null>(null);
|
||||
const [taxImported, setTaxImported] = useState<boolean>(false);
|
||||
const [templates, setTemplates] = useState<Template[]>([]);
|
||||
const [astroCollectionsStatus, setAstroCollectionsStatus] = useState<Status>(Status.Optional)
|
||||
const { getColors } = useThemeColors();
|
||||
|
||||
const frameworks: Framework[] = FrameworkDetectors.map((detector: any) => detector.framework);
|
||||
@@ -175,6 +176,9 @@ export const StepsToGetStarted: React.FunctionComponent<IStepsToGetStartedProps>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
|
||||
<p className='mt-4 text-[var(--vscode-editorWarning-foreground)]'>
|
||||
<b>{l10n.t(LocalizationKey.commonImportant)}</b>: {l10n.t(LocalizationKey.dashboardStepsStepsToGetStartedTemplateWarning)}</p>
|
||||
</div>
|
||||
),
|
||||
show: (crntTemplates || []).length > 0,
|
||||
@@ -186,10 +190,11 @@ export const StepsToGetStarted: React.FunctionComponent<IStepsToGetStartedProps>
|
||||
description: (
|
||||
<AstroContentTypes
|
||||
settings={settings}
|
||||
triggerLoading={(isLoading) => setLoading(isLoading)} />
|
||||
triggerLoading={(isLoading) => setLoading(isLoading)}
|
||||
setStatus={(status) => setAstroCollectionsStatus(status)} />
|
||||
),
|
||||
show: settings.crntFramework === 'astro',
|
||||
status: Status.Optional
|
||||
status: astroCollectionsStatus
|
||||
},
|
||||
{
|
||||
id: `welcome-content-folders`,
|
||||
@@ -259,7 +264,7 @@ export const StepsToGetStarted: React.FunctionComponent<IStepsToGetStartedProps>
|
||||
: undefined
|
||||
}
|
||||
]
|
||||
), [settings, framework, taxImported, templates]);
|
||||
), [settings, framework, taxImported, templates, astroCollectionsStatus]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (settings.crntFramework || settings.framework?.name) {
|
||||
|
||||
Reference in New Issue
Block a user