From d6758ba1f0953e85c0c5b17159abaf41dd99a1e2 Mon Sep 17 00:00:00 2001
From: Silberengel
Date: Sat, 4 Oct 2025 23:10:58 +0200
Subject: [PATCH] hide advanced options
---
.../DiscussionsPage/CreateThreadDialog.tsx | 126 ++++++++++--------
1 file changed, 70 insertions(+), 56 deletions(-)
diff --git a/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx b/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx
index fa862d0..1a01b7b 100644
--- a/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx
+++ b/src/pages/primary/DiscussionsPage/CreateThreadDialog.tsx
@@ -7,7 +7,7 @@ import { Textarea } from '@/components/ui/textarea'
import { Badge } from '@/components/ui/badge'
import { Switch } from '@/components/ui/switch'
import { Slider } from '@/components/ui/slider'
-import { Hash, X, Users, Code, Coins, Newspaper, BookOpen, Scroll, Cpu, Trophy, Film, Heart, TrendingUp, Utensils, MapPin, Home, PawPrint, Shirt, Image, Zap } from 'lucide-react'
+import { Hash, X, Users, Code, Coins, Newspaper, BookOpen, Scroll, Cpu, Trophy, Film, Heart, TrendingUp, Utensils, MapPin, Home, PawPrint, Shirt, Image, Zap, Settings } from 'lucide-react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useNostr } from '@/providers/NostrProvider'
@@ -78,6 +78,7 @@ export default function CreateThreadDialog({
const [isNsfw, setIsNsfw] = useState(false)
const [addClientTag, setAddClientTag] = useState(true)
const [minPow, setMinPow] = useState(0)
+ const [showAdvancedOptions, setShowAdvancedOptions] = useState(false)
const validateForm = () => {
const newErrors: { title?: string; content?: string; relay?: string } = {}
@@ -265,66 +266,79 @@ export default function CreateThreadDialog({
- {/* Advanced Options */}
-
-
{t('Advanced Options')}
+ {/* Advanced Options Toggle */}
+
+
- {/* NSFW Toggle */}
-
-
-
-
-
-
-
+ {showAdvancedOptions && (
+
+ {/* NSFW Toggle */}
+
+
+
+
+
+
+
- {/* Client Tag Toggle */}
-
-
-
-
-
-
-
+ {/* Client Tag Toggle */}
+
+
+
+
+
+
+
- {/* PoW Setting */}
-
-
-
-
-
-
-
setMinPow(value[0])}
- max={20}
- min={0}
- step={1}
- className="w-full"
- />
-
-
{t('No PoW')}
-
{t('High PoW')}
+ {/* PoW Setting */}
+
+
+
+
+
+
+
setMinPow(value[0])}
+ max={20}
+ min={0}
+ step={1}
+ className="w-full"
+ />
+
+ {t('No PoW')}
+ {t('High PoW')}
+
+
+
+ {t('Higher values make your thread harder to mine but more unique.')}
+
-
- {t('Higher values make your thread harder to mine but more unique.')}
-
-
+ )}
{/* Form Actions */}