refactor: rename figlet app to ascii and update all references
This commit is contained in:
@@ -16,7 +16,7 @@ export const UnitsIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
</svg>
|
||||
);
|
||||
|
||||
export const FigletIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
export const ASCIIIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg {...props} fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3.5 13h6" />
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="m2 16 4.5-9 4.5 9" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { motion } from 'framer-motion';
|
||||
import ToolCard from './ToolCard';
|
||||
import { ColorIcon, UnitsIcon, FigletIcon, MediaIcon } from '@/components/AppIcons';
|
||||
import { ColorIcon, UnitsIcon, ASCIIIcon, MediaIcon } from '@/components/AppIcons';
|
||||
|
||||
const tools = [
|
||||
{
|
||||
@@ -24,13 +24,13 @@ const tools = [
|
||||
icon: <UnitsIcon className="w-12 h-12 text-white" />,
|
||||
},
|
||||
{
|
||||
title: 'Figlet',
|
||||
title: 'ASCII',
|
||||
description: 'ASCII art text generator with 373 fonts. Create stunning text banners, terminal art, and retro designs with live preview and multiple export formats.',
|
||||
url: '/figlet',
|
||||
url: '/ascii',
|
||||
gradient: 'gradient-yellow-amber',
|
||||
accentColor: '#eab308',
|
||||
badges: ['Open Source', 'ASCII Art', 'Free'],
|
||||
icon: <FigletIcon className="w-12 h-12 text-white" />,
|
||||
icon: <ASCIIIcon className="w-12 h-12 text-white" />,
|
||||
},
|
||||
{
|
||||
title: 'Media',
|
||||
|
||||
@@ -4,21 +4,21 @@ import * as React from 'react';
|
||||
import { TextInput } from './TextInput';
|
||||
import { FontPreview } from './FontPreview';
|
||||
import { FontSelector } from './FontSelector';
|
||||
import { textToAscii } from '@/lib/figlet/figletService';
|
||||
import { getFontList } from '@/lib/figlet/fontLoader';
|
||||
import { textToAscii } from '@/lib/ascii/asciiService';
|
||||
import { getFontList } from '@/lib/ascii/fontLoader';
|
||||
import { debounce } from '@/lib/utils/debounce';
|
||||
import { addRecentFont } from '@/lib/storage/favorites';
|
||||
import { decodeFromUrl, updateUrl, getShareableUrl } from '@/lib/utils/urlSharing';
|
||||
import { toast } from 'sonner';
|
||||
import type { FigletFont } from '@/types/figlet';
|
||||
import type { ASCIIFont } from '@/types/ascii';
|
||||
import { Car } from 'lucide-react';
|
||||
import { Card, CardContent } from '../ui/card';
|
||||
|
||||
export function FigletConverter() {
|
||||
const [text, setText] = React.useState('Figlet');
|
||||
export function ASCIIConverter() {
|
||||
const [text, setText] = React.useState('ASCII');
|
||||
const [selectedFont, setSelectedFont] = React.useState('Standard');
|
||||
const [asciiArt, setAsciiArt] = React.useState('');
|
||||
const [fonts, setFonts] = React.useState<FigletFont[]>([]);
|
||||
const [fonts, setFonts] = React.useState<ASCIIFont[]>([]);
|
||||
const [isLoading, setIsLoading] = React.useState(false);
|
||||
|
||||
// Load fonts and check URL params on mount
|
||||
@@ -88,7 +88,7 @@ export function FigletConverter() {
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `figlet-${selectedFont}-${Date.now()}.txt`;
|
||||
a.download = `ascii-${selectedFont}-${Date.now()}.txt`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
@@ -45,7 +45,7 @@ export function FontPreview({ text, font, isLoading, onCopy, onDownload, onShare
|
||||
});
|
||||
|
||||
const link = document.createElement('a');
|
||||
link.download = `figlet-${font || 'export'}-${Date.now()}.png`;
|
||||
link.download = `ascii-${font || 'export'}-${Date.now()}.png`;
|
||||
link.href = dataUrl;
|
||||
link.click();
|
||||
|
||||
@@ -14,11 +14,11 @@ import {
|
||||
import { Search, X, Heart, Clock, List, Shuffle } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils/cn';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import type { FigletFont } from '@/types/figlet';
|
||||
import type { ASCIIFont } from '@/types/ascii';
|
||||
import { getFavorites, getRecentFonts, toggleFavorite, isFavorite } from '@/lib/storage/favorites';
|
||||
|
||||
export interface FontSelectorProps {
|
||||
fonts: FigletFont[];
|
||||
fonts: ASCIIFont[];
|
||||
selectedFont: string;
|
||||
onSelectFont: (fontName: string) => void;
|
||||
onRandomFont?: () => void;
|
||||
@@ -17,7 +17,7 @@ import { cn } from '@/lib/utils/cn';
|
||||
import Logo from '@/components/Logo';
|
||||
import { useSidebar } from './SidebarProvider';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ColorIcon, UnitsIcon, FigletIcon, MediaIcon } from '@/components/AppIcons';
|
||||
import { ColorIcon, UnitsIcon, ASCIIIcon, MediaIcon } from '@/components/AppIcons';
|
||||
|
||||
interface NavItem {
|
||||
title: string;
|
||||
@@ -41,9 +41,9 @@ const navigation: NavGroup[] = [
|
||||
icon: <UnitsIcon className="h-4 w-4" />
|
||||
},
|
||||
{
|
||||
title: 'Figlet ASCII',
|
||||
href: '/figlet',
|
||||
icon: <FigletIcon className="h-4 w-4" />
|
||||
title: 'ASCII Art',
|
||||
href: '/ascii',
|
||||
icon: <ASCIIIcon className="h-4 w-4" />
|
||||
},
|
||||
{
|
||||
title: 'Color Manipulation',
|
||||
|
||||
Reference in New Issue
Block a user