feat: make tryIt presets, limits, badges and buttons completely dynamic from JSON configs
This commit is contained in:
@@ -50,6 +50,7 @@ export function getPageConfig(slug: string): PageConfig | null {
|
||||
}
|
||||
|
||||
export function getAllTools(): ToolItem[] {
|
||||
toolsCache.clear();
|
||||
// 1. Prioritize management/pages/tools/[slug]/tool.config.json
|
||||
const mgmtToolsDir = path.join(MANAGEMENT_DIR, 'pages', 'tools');
|
||||
if (fs.existsSync(mgmtToolsDir)) {
|
||||
@@ -103,6 +104,7 @@ export function getToolById(id: string): ToolItem | null {
|
||||
}
|
||||
|
||||
export function getAllApps(): AppItem[] {
|
||||
appsCache.clear();
|
||||
// 1. Prioritize management/apps/[slug]/app.config.json
|
||||
const mgmtAppsDir = path.join(MANAGEMENT_DIR, 'apps');
|
||||
if (fs.existsSync(mgmtAppsDir)) {
|
||||
|
||||
Reference in New Issue
Block a user