Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.
refactor: remove em dashes from all frontend source files, fix Github icon import
valzor7a20628d0827
diff --git a/frontend/src/features/accounts/AccountManager.jsx b/frontend/src/features/accounts/AccountManager.jsxindex 612cc92..b5d2fc0 100644--- a/frontend/src/features/accounts/AccountManager.jsx+++ b/frontend/src/features/accounts/AccountManager.jsx@@ -1,4 +1,4 @@-import React, { useState, useEffect } from 'react';+import React, { useState, useEffect } from 'react';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Badge } from '@/components/ui/badge';@@ -44,7 +44,7 @@ export default function AccountManager() {igError === 'already_added' ? 'This Instagram account is already connected' :igError === 'cancelled' ? 'Instagram authorization was cancelled' :igError === 'access_denied' ? 'Instagram authorization was denied' :- igError === 'invalid_state' ? 'Authorization expired — please try again' :+ igError === 'invalid_state' ? 'Authorization expired - please try again' :'Instagram connection failed: ' + igError;showToast(msg, 'error');window.history.replaceState({}, '', window.location.pathname);@@ -84,7 +84,7 @@ export default function AccountManager() {setConnecting(true);try {const { url } = await api.getInstagramAuthUrl();- // Navigate the same tab — Instagram will redirect back to /accounts?ig_connected=true+ // Navigate the same tab - Instagram will redirect back to /accounts?ig_connected=truewindow.location.href = url;} catch (err) {showToast('Failed to start Instagram login: ' + err.message, 'error');diff --git a/frontend/src/features/publishing/UploadContent.jsx b/frontend/src/features/publishing/UploadContent.jsxindex e8f33cc..ea54f0a 100644--- a/frontend/src/features/publishing/UploadContent.jsx+++ b/frontend/src/features/publishing/UploadContent.jsx@@ -1,4 +1,4 @@-import React, { useState, useEffect, useRef } from 'react';+import React, { useState, useEffect, useRef } from 'react';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';import { Label } from '@/components/ui/label';@@ -397,7 +397,7 @@ export default function UploadContent() {active: bulkFiles.filter(f => ['uploading','creating','processing','publishing','scheduling'].includes(f.status)).length,};- const fmtLocalDate = (iso) => iso ? new Date(iso).toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' }) : '—';+ const fmtLocalDate = (iso) => iso ? new Date(iso).toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' }) : '-';const sPostsCounts = {all: scheduledPosts.length,@@ -425,7 +425,7 @@ export default function UploadContent() {<Alert><AlertDescription>No Instagram accounts found. Add an account in the Accounts section first.</AlertDescription></Alert>)}{!cloudConfig && (- <Alert><AlertDescription><strong>Cloudinary CDN required</strong> — Configure it in <strong>Settings</strong> to enable uploads.</AlertDescription></Alert>+ <Alert><AlertDescription><strong>Cloudinary CDN required</strong> - Configure it in <strong>Settings</strong> to enable uploads.</AlertDescription></Alert>)}{/* Mode Tabs */}@@ -600,10 +600,10 @@ export default function UploadContent() {)}<Separator /><div className="text-xs text-muted-foreground space-y-1">- <p>Account: <strong className="text-foreground">{selectedAcct?.title || selectedAcct?.username || '—'}</strong></p>+ <p>Account: <strong className="text-foreground">{selectedAcct?.title || selectedAcct?.username || '-'}</strong></p><p>Type: <strong style={{ color: selectedType?.color }}>{selectedType?.label}</strong></p>- <p>File: <strong className="text-foreground">{file?.name || '—'}</strong></p>- <p>Size: <strong className="text-foreground">{file ? `${(file.size / (1024 * 1024)).toFixed(2)} MB` : '—'}</strong></p>+ <p>File: <strong className="text-foreground">{file?.name || '-'}</strong></p>+ <p>Size: <strong className="text-foreground">{file ? `${(file.size / (1024 * 1024)).toFixed(2)} MB` : '-'}</strong></p>{scheduleMode && scheduleDate && scheduleTime && <p>Schedule: <strong className="text-amber-600">{new Date(`${scheduleDate}T${scheduleTime}`).toLocaleString()}</strong></p>}</div></div>@@ -996,7 +996,7 @@ export default function UploadContent() {<TableCell>{post.error ? (<Tooltip><TooltipTrigger render={<p className="text-xs max-w-40 truncate text-red-500 cursor-help" />}>{post.error}</TooltipTrigger><TooltipContent>{post.error}</TooltipContent></Tooltip>- ) : <span className="text-muted-foreground text-xs">—</span>}+ ) : <span className="text-muted-foreground text-xs">-</span>}</TableCell><TableCell className="text-right whitespace-nowrap">{canEdit && !isEditing && <Tooltip><TooltipTrigger render={<Button variant="ghost" size="icon" className="size-7 text-muted-foreground hover:text-amber-500" onClick={() => startEditPost(post)} />}><Pencil /></TooltipTrigger><TooltipContent>Edit</TooltipContent></Tooltip>}@@ -1054,7 +1054,7 @@ export default function UploadContent() {<AlertDialogTitle>Delete all scheduled posts?</AlertDialogTitle><AlertDialogDescription>This removes every post from your records (pending, published, and failed) and syncs to GitHub.- Posts already <strong>published to Instagram remain live</strong> — only local records are deleted.+ Posts already <strong>published to Instagram remain live</strong> - only local records are deleted.</AlertDialogDescription></AlertDialogHeader><AlertDialogFooter>@@ -1073,7 +1073,7 @@ export default function UploadContent() {<AlertDialogTitle>Remove published post?</AlertDialogTitle><AlertDialogDescription>This removes the entry from your records and syncs to GitHub.- The post will <strong>remain live on Instagram</strong> — only local records are removed.+ The post will <strong>remain live on Instagram</strong> - only local records are removed.</AlertDialogDescription></AlertDialogHeader><AlertDialogFooter>diff --git a/frontend/src/features/settings/Settings.jsx b/frontend/src/features/settings/Settings.jsxindex 916d31e..c6b4246 100644--- a/frontend/src/features/settings/Settings.jsx+++ b/frontend/src/features/settings/Settings.jsx@@ -5,7 +5,7 @@ import { Separator } from '@/components/ui/separator';import { Skeleton } from '@/components/ui/skeleton';import { Badge } from '@/components/ui/badge';import {- RefreshCw, CheckCircle2, Info, AlertTriangle, ShieldCheck, Github,+ RefreshCw, CheckCircle2, Info, AlertTriangle, ShieldCheck, GitBranch,Key, ExternalLink, Copy, Check,} from 'lucide-react';import MainCard from '../../components/MainCard';@@ -126,7 +126,7 @@ export default function Settings() {<MainCard title="GitHub Personal Access Token"><div className="space-y-4"><div className="flex items-start gap-3 p-3 rounded-lg bg-muted/50 border border-border">- <Github className="h-5 w-5 text-foreground mt-0.5 flex-shrink-0" />+ <GitBranch className="h-5 w-5 text-foreground mt-0.5 flex-shrink-0" /><div className="space-y-1"><p className="text-sm font-medium">What is a GitHub PAT and why do you need it?</p><p className="text-sm text-muted-foreground">diff --git a/frontend/src/services/api.js b/frontend/src/services/api.jsindex ee7c160..93e738a 100644--- a/frontend/src/services/api.js+++ b/frontend/src/services/api.js@@ -1,4 +1,4 @@-import { supabase } from '../lib/supabase';+import { supabase } from '../lib/supabase';const API = import.meta.env.VITE_API_URL || 'http://localhost:8787/api';@@ -22,7 +22,7 @@ export const api = {// Healthhealth: () => request('/health'),- // Server key status — all keys are env vars, this just returns configured: true/false+ // Server key status - all keys are env vars, this just returns configured: true/falsegetKeys: () => request('/keys'),// Accounts@@ -32,7 +32,7 @@ export const api = {refreshAccount: (id) => request(`/accounts/${id}/refresh`, { method: 'POST' }),refreshAll: () => request('/accounts/refresh-all', { method: 'POST' }),- // Instagram OAuth — gets the auth URL to redirect the browser to+ // Instagram OAuth - gets the auth URL to redirect the browser togetInstagramAuthUrl: () => request('/auth/instagram/url'),// Instagram accounts