mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-30 11:26:23 +00:00
Update notification-settings.tsx
This commit is contained in:
@@ -1478,18 +1478,51 @@ export function NotificationSettings() {
|
|||||||
|
|
||||||
{/* ── Advanced: AI Enhancement ── */}
|
{/* ── Advanced: AI Enhancement ── */}
|
||||||
<div>
|
<div>
|
||||||
<button
|
<div className="flex items-center justify-between py-1">
|
||||||
className="flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full py-1"
|
<button
|
||||||
onClick={() => setShowAdvanced(!showAdvanced)}
|
className="flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||||
>
|
onClick={() => setShowAdvanced(!showAdvanced)}
|
||||||
{showAdvanced ? <ChevronUp className="h-3 w-3" /> : <ChevronDown className="h-3 w-3" />}
|
>
|
||||||
<span className="font-medium uppercase tracking-wider">Advanced: AI Enhancement</span>
|
{showAdvanced ? <ChevronUp className="h-3 w-3" /> : <ChevronDown className="h-3 w-3" />}
|
||||||
{config.ai_enabled && (
|
<span className="font-medium uppercase tracking-wider">Advanced: AI Enhancement</span>
|
||||||
<Badge variant="outline" className="text-[9px] border-purple-500/30 text-purple-400 ml-1">
|
{config.ai_enabled && (
|
||||||
ON
|
<Badge variant="outline" className="text-[9px] border-purple-500/30 text-purple-400 ml-1">
|
||||||
</Badge>
|
ON
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
|
</button>
|
||||||
|
{showAdvanced && (
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
{editMode ? (
|
||||||
|
<>
|
||||||
|
<button
|
||||||
|
className="h-6 px-2 text-xs rounded-md border border-border bg-background hover:bg-muted transition-colors text-muted-foreground"
|
||||||
|
onClick={handleCancel}
|
||||||
|
disabled={saving}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="h-6 px-2 text-xs rounded-md bg-blue-600 hover:bg-blue-700 text-white transition-colors disabled:opacity-50 flex items-center gap-1"
|
||||||
|
onClick={handleSave}
|
||||||
|
disabled={saving || !hasChanges}
|
||||||
|
>
|
||||||
|
{saving ? <Loader2 className="h-3 w-3 animate-spin" /> : <CheckCircle2 className="h-3 w-3" />}
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<button
|
||||||
|
className="h-6 px-2 text-xs rounded-md border border-border bg-background hover:bg-muted transition-colors flex items-center gap-1"
|
||||||
|
onClick={() => setEditMode(true)}
|
||||||
|
>
|
||||||
|
<Settings2 className="h-3 w-3" />
|
||||||
|
Edit
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</button>
|
</div>
|
||||||
|
|
||||||
{showAdvanced && (
|
{showAdvanced && (
|
||||||
<div className="space-y-4 mt-3 p-4 rounded-lg bg-muted/30 border border-border/50">
|
<div className="space-y-4 mt-3 p-4 rounded-lg bg-muted/30 border border-border/50">
|
||||||
@@ -1891,6 +1924,14 @@ export function NotificationSettings() {
|
|||||||
<Upload className="h-4 w-4" />
|
<Upload className="h-4 w-4" />
|
||||||
Import
|
Import
|
||||||
</Button>
|
</Button>
|
||||||
|
<a
|
||||||
|
href="https://github.com/MacRimi/ProxMenux/discussions/categories/share-custom-prompts-for-ai-notifications"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="text-xs text-purple-400 hover:text-purple-300 transition-colors flex items-center gap-1"
|
||||||
|
>
|
||||||
|
Community prompts <ExternalLink className="h-3 w-3" />
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-start gap-2 p-3 rounded-md bg-purple-500/10 border border-purple-500/20">
|
<div className="flex items-start gap-2 p-3 rounded-md bg-purple-500/10 border border-purple-500/20">
|
||||||
<Info className="h-4 w-4 text-purple-400 shrink-0 mt-0.5" />
|
<Info className="h-4 w-4 text-purple-400 shrink-0 mt-0.5" />
|
||||||
|
|||||||
Reference in New Issue
Block a user