-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/generic settings #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
f7f376a1fcd0d0e11a10ed1b6577c9
merged 16 commits into
main
from
feature/generic-settings
May 13, 2025
Merged
Feature/generic settings #42
f7f376a1fcd0d0e11a10ed1b6577c9
merged 16 commits into
main
from
feature/generic-settings
May 13, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit includes: - New API endpoints for viewing and unblocking moderated events - Enhanced ModerationNotifications component with event details modal - Unblock button for false positives in moderation system - Scroll position reset after event deletion - Updated BaseModal to use 'open' prop instead of deprecated 'visible' prop
This commit includes: - Implementation of moderation mode feature in relay settings - Addition of strict and passive mode options - Improved text color contrast for better readability on dark backgrounds - Integration with existing relay settings UI
- Add TypeScript interfaces for all settings groups - Create useGenericSettings hook for unified settings management - Implement BaseSettingsForm component for consistent UI - Create components for all settings groups: - ContentFilterSettings - NestFeederSettings - OllamaSettings - WalletSettings - GeneralSettings - RelayInfoSettings - QueryCacheSettings - XNostrSettings (with complex nested settings) - Update AppRouter with new settings routes - Modify useRelaySettings to use the generic hook
- Restore original useRelaySettings.ts implementation - Add new 'Advanced Settings' entry to sidebar navigation - Remove relay settings from SettingsPage component - Update SettingsNavigation to remove relay settings tab - Keep relay settings and generic settings completely separate
…yer. This resolves the issue where image moderation and other settings values weren't displaying properly in the advanced settings panels.
…issues - Simplify moderation mode options to three (Basic, Strict, Full) - Add detailed descriptions for each mode with focus, performance, and use cases - Fix property name transformation between unprefixed backend keys and prefixed UI keys - Fix ESLint errors by escaping quotes in JSX text - Ensure UI correctly displays values from the backend Known issue: When modifying a single setting, other values may become undefined when saving. This needs further investigation to better preserve existing values during save operations.
When updating individual fields in advanced settings panels like image moderation, ensure all other field values are preserved. The fix maintains proper field prefix handling when saving to the backend API.
- Added isUserEditing state to track when user is actively editing a form - Prevented form values from being overwritten during editing - Fixed issues in ContentFilterSettings, NestFeederSettings, OllamaSettings, XNostrSettings, WalletSettings, and panel components - Added custom save/reset handlers to manage editing state properly
f7f376a1fcd0d0e11a10ed1b6577c9
approved these changes
May 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Advanced Settings Implementation and Node.js v23 Compatibility
Overview
This PR implements a comprehensive advanced settings system for the HORNETS-Relay-Panel, along with critical fixes for Node.js v23 compatibility and several UI improvements.
Key Features
Generic Settings System
useGenericSettingshook to provide a unified approach for handling all types of relay settingsAdvanced Settings Layout
AdvancedSettingsLayoutcomponent to organize complex settings panelsNode.js v23 Compatibility
NODE_OPTIONS=--openssl-legacy-providerUI Improvements
isUserEditingstate flagTechnical Details
Settings Synchronization Fix
mode: "full"), but the form uses prefixed keys (likeimage_moderation_mode)useGenericSettingshook to sync prefixed and unprefixed valuesBackend Compatibility Fix
mode,api, etc.)saveSettingsfunction to extract only the unprefixed keys before sending to the backendPartial Settings Update Fix
saveSettingsfunction to transform all prefixed keys to unprefixed keysTesting