mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 13:25:11 +00:00
Add additional icons for agents, pencil line and chalkboard
This commit is contained in:
@@ -24,6 +24,8 @@ import {
|
|||||||
BowlFood,
|
BowlFood,
|
||||||
Lectern,
|
Lectern,
|
||||||
Wallet,
|
Wallet,
|
||||||
|
PencilLine,
|
||||||
|
Chalkboard,
|
||||||
} from "@phosphor-icons/react";
|
} from "@phosphor-icons/react";
|
||||||
import { Markdown, OrgMode, Pdf, Word } from "@/app/components/logo/fileLogo";
|
import { Markdown, OrgMode, Pdf, Word } from "@/app/components/logo/fileLogo";
|
||||||
|
|
||||||
@@ -95,6 +97,12 @@ const iconMap: IconMap = {
|
|||||||
Wallet: (color: string, width: string, height: string) => (
|
Wallet: (color: string, width: string, height: string) => (
|
||||||
<Wallet className={`${width} ${height} ${color} mr-2`} />
|
<Wallet className={`${width} ${height} ${color} mr-2`} />
|
||||||
),
|
),
|
||||||
|
PencilLine: (color: string, width: string, height: string) => (
|
||||||
|
<PencilLine className={`${width} ${height} ${color} mr-2`} />
|
||||||
|
),
|
||||||
|
Chalkboard: (color: string, width: string, height: string) => (
|
||||||
|
<Chalkboard className={`${width} ${height} ${color} mr-2`} />
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
function getIconFromIconName(
|
function getIconFromIconName(
|
||||||
|
|||||||
37
src/khoj/database/migrations/0055_alter_agent_style_icon.py
Normal file
37
src/khoj/database/migrations/0055_alter_agent_style_icon.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Generated by Django 5.0.7 on 2024-08-05 11:51
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("database", "0054_alter_agent_style_color"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="agent",
|
||||||
|
name="style_icon",
|
||||||
|
field=models.CharField(
|
||||||
|
choices=[
|
||||||
|
("Lightbulb", "Lighbulb"),
|
||||||
|
("Health", "Health"),
|
||||||
|
("Robot", "Robot"),
|
||||||
|
("Aperture", "Aperture"),
|
||||||
|
("GraduationCap", "Graduation Cap"),
|
||||||
|
("Jeep", "Jeep"),
|
||||||
|
("Island", "Island"),
|
||||||
|
("MathOperations", "Math Operations"),
|
||||||
|
("Asclepius", "Asclepius"),
|
||||||
|
("Couch", "Couch"),
|
||||||
|
("Code", "Code"),
|
||||||
|
("Atom", "Atom"),
|
||||||
|
("ClockCounterClockwise", "Clock Counter Clockwise"),
|
||||||
|
("PencilLine", "Pencil Line"),
|
||||||
|
("Chalkboard", "Chalkboard"),
|
||||||
|
],
|
||||||
|
default="Lightbulb",
|
||||||
|
max_length=200,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -135,6 +135,8 @@ class Agent(BaseModel):
|
|||||||
CODE = "Code"
|
CODE = "Code"
|
||||||
ATOM = "Atom"
|
ATOM = "Atom"
|
||||||
CLOCK_COUNTER_CLOCKWISE = "ClockCounterClockwise"
|
CLOCK_COUNTER_CLOCKWISE = "ClockCounterClockwise"
|
||||||
|
PENCIL_LINE = "PencilLine"
|
||||||
|
CHALKBOARD = "Chalkboard"
|
||||||
|
|
||||||
creator = models.ForeignKey(
|
creator = models.ForeignKey(
|
||||||
KhojUser, on_delete=models.CASCADE, default=None, null=True, blank=True
|
KhojUser, on_delete=models.CASCADE, default=None, null=True, blank=True
|
||||||
|
|||||||
Reference in New Issue
Block a user