feat(dashboard): add Channels tab to manage channel profiles
New Channels section backed by the /api/channels CRUD API: - list rail plus a full editor for every profile field - chip inputs for string lists, reorderable thumbnail role order, presenter toggle - create/update/delete with inline confirm and server-error surfacing - JSON import/export (all profiles or one), with per-item import failures - responsive two-column layout in the app's design language Renumbers Settings to 04 and adds channels to the deep-link tabs.
This commit is contained in:
parent
ab5cdb87a9
commit
d6275aab4c
2 changed files with 1039 additions and 4 deletions
|
|
@ -1,10 +1,11 @@
|
||||||
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
||||||
import { Youtube, Instagram, Share2, ChevronDown, Check, Activity, LayoutDashboard, Settings, Plus, X, Terminal, Shield, Image, RotateCcw, AlertTriangle, KeyRound, ExternalLink, Mail, Loader2, Download, Menu, Lock } from 'lucide-react';
|
import { Youtube, Instagram, Share2, ChevronDown, Check, Activity, LayoutDashboard, Settings, Plus, X, Terminal, Shield, Image, Radio, RotateCcw, AlertTriangle, KeyRound, ExternalLink, Mail, Loader2, Download, Menu, Lock } from 'lucide-react';
|
||||||
import KeyInput from './components/KeyInput';
|
import KeyInput from './components/KeyInput';
|
||||||
import MediaInput from './components/MediaInput';
|
import MediaInput from './components/MediaInput';
|
||||||
import ResultCard from './components/ResultCard';
|
import ResultCard from './components/ResultCard';
|
||||||
import ProcessingAnimation from './components/ProcessingAnimation';
|
import ProcessingAnimation from './components/ProcessingAnimation';
|
||||||
import ThumbnailStudio from './components/ThumbnailStudio';
|
import ThumbnailStudio from './components/ThumbnailStudio';
|
||||||
|
import ChannelProfiles from './components/ChannelProfiles';
|
||||||
import ClipEditor from './components/ClipEditor';
|
import ClipEditor from './components/ClipEditor';
|
||||||
import ReframeEditor from './components/ReframeEditor';
|
import ReframeEditor from './components/ReframeEditor';
|
||||||
import StarBanner from './components/StarBanner';
|
import StarBanner from './components/StarBanner';
|
||||||
|
|
@ -575,7 +576,7 @@ function App() {
|
||||||
// Read once per hash change, then the query is dropped so a reload does not
|
// Read once per hash change, then the query is dropped so a reload does not
|
||||||
// keep forcing the tab.
|
// keep forcing the tab.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const DEEP_LINK_TABS = ['settings', 'thumbnails', 'dashboard'];
|
const DEEP_LINK_TABS = ['settings', 'thumbnails', 'channels', 'dashboard'];
|
||||||
const apply = () => {
|
const apply = () => {
|
||||||
const hash = window.location.hash || '';
|
const hash = window.location.hash || '';
|
||||||
if (!hash.startsWith('#app?')) return;
|
if (!hash.startsWith('#app?')) return;
|
||||||
|
|
@ -810,7 +811,8 @@ function App() {
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{ id: 'dashboard', ord: '01', icon: LayoutDashboard, label: 'Clip Generator', short: 'clips', primary: true },
|
{ id: 'dashboard', ord: '01', icon: LayoutDashboard, label: 'Clip Generator', short: 'clips', primary: true },
|
||||||
{ id: 'thumbnails', ord: '02', icon: Image, label: 'YouTube Studio', short: 'studio', primary: true },
|
{ id: 'thumbnails', ord: '02', icon: Image, label: 'YouTube Studio', short: 'studio', primary: true },
|
||||||
{ id: 'settings', ord: '03', icon: Settings, label: 'Settings', short: 'settings' },
|
{ id: 'channels', ord: '03', icon: Radio, label: 'Channels', short: 'channels' },
|
||||||
|
{ id: 'settings', ord: '04', icon: Settings, label: 'Settings', short: 'settings' },
|
||||||
];
|
];
|
||||||
const activeNav = navItems.find((n) => n.id === activeTab);
|
const activeNav = navItems.find((n) => n.id === activeTab);
|
||||||
|
|
||||||
|
|
@ -1102,12 +1104,15 @@ function App() {
|
||||||
{/* Main Workspace */}
|
{/* Main Workspace */}
|
||||||
<div className="flex-1 overflow-hidden relative">
|
<div className="flex-1 overflow-hidden relative">
|
||||||
|
|
||||||
|
{/* View: Channels */}
|
||||||
|
{activeTab === 'channels' && <ChannelProfiles />}
|
||||||
|
|
||||||
{/* View: Settings */}
|
{/* View: Settings */}
|
||||||
{activeTab === 'settings' && (
|
{activeTab === 'settings' && (
|
||||||
<div className="h-full overflow-y-auto p-4 sm:p-8 max-w-2xl mx-auto animate-fade">
|
<div className="h-full overflow-y-auto p-4 sm:p-8 max-w-2xl mx-auto animate-fade">
|
||||||
<div className="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-8">
|
<div className="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-8">
|
||||||
<div>
|
<div>
|
||||||
<p className="eyebrow mb-1.5">03 · SETTINGS</p>
|
<p className="eyebrow mb-1.5">04 · SETTINGS</p>
|
||||||
<h1 className="font-display lowercase text-2xl text-ink">Settings</h1>
|
<h1 className="font-display lowercase text-2xl text-ink">Settings</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2 text-xs text-muted mt-1">
|
<div className="flex items-center gap-2 text-xs text-muted mt-1">
|
||||||
|
|
|
||||||
1030
dashboard/src/components/ChannelProfiles.jsx
Normal file
1030
dashboard/src/components/ChannelProfiles.jsx
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue