Add icon support for tools and improve analytics chart display
Update API, database schema, and frontend components to allow optional icons for tools, and adjust analytics chart rendering for better visibility. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 776963d0-f75d-42e2-a57b-cc36bdff8495 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 0ad0b686-eebd-46d2-8314-67e9e874e224 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0683fb79-a27c-485c-9333-5f4b288c4567/776963d0-f75d-42e2-a57b-cc36bdff8495/1p7jhzu Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -16,6 +16,8 @@ export interface Tool {
|
||||
category: string;
|
||||
/** @nullable */
|
||||
websiteUrl?: string | null;
|
||||
/** @nullable */
|
||||
iconUrl?: string | null;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
createdAt: string;
|
||||
@@ -29,6 +31,8 @@ export interface ToolWithStats {
|
||||
category: string;
|
||||
/** @nullable */
|
||||
websiteUrl?: string | null;
|
||||
/** @nullable */
|
||||
iconUrl?: string | null;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
createdAt: string;
|
||||
@@ -50,6 +54,7 @@ export interface ToolInput {
|
||||
/** @minLength 1 */
|
||||
category: string;
|
||||
websiteUrl?: string;
|
||||
iconUrl?: string;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
}
|
||||
@@ -60,6 +65,7 @@ export interface ToolUpdate {
|
||||
description?: string;
|
||||
category?: string;
|
||||
websiteUrl?: string;
|
||||
iconUrl?: string;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
@@ -362,6 +362,8 @@ components:
|
||||
type: string
|
||||
websiteUrl:
|
||||
type: ["string", "null"]
|
||||
iconUrl:
|
||||
type: ["string", "null"]
|
||||
features:
|
||||
type: array
|
||||
items:
|
||||
@@ -391,6 +393,8 @@ components:
|
||||
type: string
|
||||
websiteUrl:
|
||||
type: ["string", "null"]
|
||||
iconUrl:
|
||||
type: ["string", "null"]
|
||||
features:
|
||||
type: array
|
||||
items:
|
||||
@@ -429,6 +433,8 @@ components:
|
||||
minLength: 1
|
||||
websiteUrl:
|
||||
type: string
|
||||
iconUrl:
|
||||
type: string
|
||||
features:
|
||||
type: array
|
||||
items:
|
||||
@@ -450,6 +456,8 @@ components:
|
||||
type: string
|
||||
websiteUrl:
|
||||
type: string
|
||||
iconUrl:
|
||||
type: string
|
||||
features:
|
||||
type: array
|
||||
items:
|
||||
|
||||
@@ -32,6 +32,7 @@ export const ListToolsResponseItem = zod.object({
|
||||
"description": zod.string(),
|
||||
"category": zod.string(),
|
||||
"websiteUrl": zod.string().nullish(),
|
||||
"iconUrl": zod.string().nullish(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional(),
|
||||
"createdAt": zod.coerce.date(),
|
||||
@@ -57,6 +58,7 @@ export const CreateToolBody = zod.object({
|
||||
"description": zod.string().min(1),
|
||||
"category": zod.string().min(1),
|
||||
"websiteUrl": zod.string().optional(),
|
||||
"iconUrl": zod.string().optional(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional()
|
||||
})
|
||||
@@ -75,6 +77,7 @@ export const GetToolResponse = zod.object({
|
||||
"description": zod.string(),
|
||||
"category": zod.string(),
|
||||
"websiteUrl": zod.string().nullish(),
|
||||
"iconUrl": zod.string().nullish(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional(),
|
||||
"createdAt": zod.coerce.date(),
|
||||
@@ -101,6 +104,7 @@ export const UpdateToolBody = zod.object({
|
||||
"description": zod.string().optional(),
|
||||
"category": zod.string().optional(),
|
||||
"websiteUrl": zod.string().optional(),
|
||||
"iconUrl": zod.string().optional(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional()
|
||||
})
|
||||
@@ -111,6 +115,7 @@ export const UpdateToolResponse = zod.object({
|
||||
"description": zod.string(),
|
||||
"category": zod.string(),
|
||||
"websiteUrl": zod.string().nullish(),
|
||||
"iconUrl": zod.string().nullish(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional(),
|
||||
"createdAt": zod.coerce.date(),
|
||||
@@ -188,6 +193,7 @@ export const GetAnalyticsSummaryResponse = zod.object({
|
||||
"description": zod.string(),
|
||||
"category": zod.string(),
|
||||
"websiteUrl": zod.string().nullish(),
|
||||
"iconUrl": zod.string().nullish(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional(),
|
||||
"createdAt": zod.coerce.date(),
|
||||
@@ -215,6 +221,7 @@ export const GetTopToolsResponseItem = zod.object({
|
||||
"description": zod.string(),
|
||||
"category": zod.string(),
|
||||
"websiteUrl": zod.string().nullish(),
|
||||
"iconUrl": zod.string().nullish(),
|
||||
"features": zod.array(zod.string()).optional(),
|
||||
"tags": zod.array(zod.string()).optional(),
|
||||
"createdAt": zod.coerce.date(),
|
||||
|
||||
@@ -13,6 +13,8 @@ export interface Tool {
|
||||
category: string;
|
||||
/** @nullable */
|
||||
websiteUrl?: string | null;
|
||||
/** @nullable */
|
||||
iconUrl?: string | null;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
createdAt: Date;
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface ToolInput {
|
||||
/** @minLength 1 */
|
||||
category: string;
|
||||
websiteUrl?: string;
|
||||
iconUrl?: string;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface ToolUpdate {
|
||||
description?: string;
|
||||
category?: string;
|
||||
websiteUrl?: string;
|
||||
iconUrl?: string;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ export interface ToolWithStats {
|
||||
category: string;
|
||||
/** @nullable */
|
||||
websiteUrl?: string | null;
|
||||
/** @nullable */
|
||||
iconUrl?: string | null;
|
||||
features?: string[];
|
||||
tags?: string[];
|
||||
createdAt: Date;
|
||||
|
||||
@@ -8,6 +8,7 @@ export const toolsTable = pgTable("tools", {
|
||||
description: text("description").notNull(),
|
||||
category: text("category").notNull(),
|
||||
websiteUrl: text("website_url"),
|
||||
iconUrl: text("icon_url"),
|
||||
features: text("features").array().notNull().default([]),
|
||||
tags: text("tags").array().notNull().default([]),
|
||||
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
||||
|
||||
Reference in New Issue
Block a user