|
|
|
@ -59,7 +59,7 @@ const FOLLOW_SET_FETCH_OPTS = { |
|
|
|
const FollowSetsSettingsPage = forwardRef( |
|
|
|
const FollowSetsSettingsPage = forwardRef( |
|
|
|
({ index, hideTitlebar = false }: { index?: number; hideTitlebar?: boolean }, ref) => { |
|
|
|
({ index, hideTitlebar = false }: { index?: number; hideTitlebar?: boolean }, ref) => { |
|
|
|
const { t } = useTranslation() |
|
|
|
const { t } = useTranslation() |
|
|
|
const { pubkey, publish, attemptDelete, checkLogin, relayList } = useNostr() |
|
|
|
const { pubkey, account, publish, attemptDelete, checkLogin, relayList } = useNostr() |
|
|
|
const { favoriteRelays, blockedRelays } = useFavoriteRelays() |
|
|
|
const { favoriteRelays, blockedRelays } = useFavoriteRelays() |
|
|
|
const [lists, setLists] = useState<Event[]>([]) |
|
|
|
const [lists, setLists] = useState<Event[]>([]) |
|
|
|
const [loading, setLoading] = useState(true) |
|
|
|
const [loading, setLoading] = useState(true) |
|
|
|
@ -74,6 +74,8 @@ const FollowSetsSettingsPage = forwardRef( |
|
|
|
const [deleteTarget, setDeleteTarget] = useState<Event | null>(null) |
|
|
|
const [deleteTarget, setDeleteTarget] = useState<Event | null>(null) |
|
|
|
const [deleting, setDeleting] = useState(false) |
|
|
|
const [deleting, setDeleting] = useState(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const canSignEvents = account != null && account.signerType !== 'npub' |
|
|
|
|
|
|
|
|
|
|
|
const { registerPrimaryPanelRefresh } = usePrimaryNoteView() |
|
|
|
const { registerPrimaryPanelRefresh } = usePrimaryNoteView() |
|
|
|
|
|
|
|
|
|
|
|
const buildReadRelays = useCallback((): string[] => { |
|
|
|
const buildReadRelays = useCallback((): string[] => { |
|
|
|
@ -275,6 +277,7 @@ const FollowSetsSettingsPage = forwardRef( |
|
|
|
<Pencil className="size-4" /> |
|
|
|
<Pencil className="size-4" /> |
|
|
|
<span className="sr-only">{t('Edit')}</span> |
|
|
|
<span className="sr-only">{t('Edit')}</span> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
|
|
|
|
{canSignEvents && ev.pubkey === pubkey ? ( |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
type="button" |
|
|
|
type="button" |
|
|
|
variant="outline" |
|
|
|
variant="outline" |
|
|
|
@ -286,6 +289,7 @@ const FollowSetsSettingsPage = forwardRef( |
|
|
|
<Trash2 className="size-4" /> |
|
|
|
<Trash2 className="size-4" /> |
|
|
|
<span className="sr-only">{t('Delete')}</span> |
|
|
|
<span className="sr-only">{t('Delete')}</span> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
|
|
|
|
) : null} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
))} |
|
|
|
))} |
|
|
|
|