Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REACT_APP_BASE_URL=http://localhost:9002
REACT_APP_WALLET_BASE_URL=http://localhost:9003
REACT_APP_ASSETS_BUCKET=http://localhost
REACT_APP_DEMO_MODE=true
REACT_APP_DEMO_MODE=false

# More info https://create-react-app.dev/docs/advanced-configuration
ESLINT_NO_DEV_ERRORS=true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ yarn-error.log*

# generated files
/public/themes
/memory-bank
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We have a live demo that can be found at http://hornetstorage.net for anyone tha

## Key Features
- Manage your hornet-storage relay config directly from the panel
- Switch between our new dumb and smart model for accepting nostr notes
- Switch between our new whitelist and blacklist model for accepting nostr notes
- Decide from which of the supported nostr kinds to enable
- Choose which supported transport protocols to enable such as libp2p and websockets
- Enable / disable which media extensions are accepted by the relay such as png and mp4
Expand Down
66 changes: 0 additions & 66 deletions src/api/moderationNotifications.api.ts

This file was deleted.

13 changes: 1 addition & 12 deletions src/api/notifications.api.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
export interface Message {
id: number;
description: string;
moderationData?: {
id: number;
pubkey: string;
event_id: string;
reason: string;
created_at: string;
is_read: boolean;
content_type: string;
media_url?: string;
thumbnail_url?: string;
};
}

export interface Mention extends Message {
Expand All @@ -23,5 +12,5 @@ export interface Mention extends Message {

export type Notification = Mention | Message;

// Export an empty array now that we're using real moderation notifications
// Export an empty array for notifications
export const notifications: Notification[] = [];
31 changes: 28 additions & 3 deletions src/components/common/BaseModal/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import React from 'react';
import { Modal, ModalProps } from 'antd';
import { modalSizes } from 'constants/modalSizes';

interface BaseModalProps extends ModalProps {
// Extend ModalProps to include our custom props
interface BaseModalProps extends Omit<ModalProps, 'visible'> {
size?: 'small' | 'medium' | 'large';
visible?: boolean; // Deprecated prop
open?: boolean; // New prop that will replace visible
}

interface BaseModalInterface extends React.FC<BaseModalProps> {
Expand All @@ -13,11 +16,33 @@ interface BaseModalInterface extends React.FC<BaseModalProps> {
error: typeof Modal.error;
}

export const BaseModal: BaseModalInterface = ({ size = 'medium', children, ...props }) => {
export const BaseModal: BaseModalInterface = ({
size = 'medium',
visible,
open,
children,
...props
}) => {
const modalSize = Object.entries(modalSizes).find((sz) => sz[0] === size)?.[1];

// If open is provided, use it. Otherwise, fall back to visible.
// This ensures backward compatibility while supporting the new prop.
const isOpen = open !== undefined ? open : visible;

// Show deprecation warning in development mode
if (process.env.NODE_ENV === 'development' && visible !== undefined && open === undefined) {
console.warn(
'[antd: Modal] `visible` will be removed in next major version, please use `open` instead.'
);
}

return (
<Modal getContainer={false} width={modalSize} {...props}>
<Modal
getContainer={false}
width={modalSize}
open={isOpen}
{...props}
>
{children}
</Modal>
);
Expand Down
4 changes: 1 addition & 3 deletions src/components/common/BaseNotification/BaseNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ interface Icons {
success: React.ReactNode;
warning: React.ReactNode;
error: React.ReactNode;
moderation: React.ReactNode;
mention: React.ReactNode;
}

export type NotificationType = 'info' | 'mention' | 'success' | 'warning' | 'error' | 'moderation';
export type NotificationType = 'info' | 'mention' | 'success' | 'warning' | 'error';

interface BaseNotificationProps {
type: NotificationType;
Expand All @@ -27,7 +26,6 @@ export const BaseNotification: React.FC<BaseNotificationProps> = ({ type, mentio
success: <CheckCircleFilled />,
warning: <ExclamationCircleFilled />,
error: <WarningFilled />,
moderation: <WarningFilled style={{ color: 'var(--error-color)' }} />,
mention: mentionIconSrc,
};

Expand Down

This file was deleted.

Loading
Loading