+ {!showPublishedPreview ? (
+ <>
+ {/* Editor */}
+
+
+
+
+ {/* Action buttons */}
+
+ {/* Upload button */}
+
+
+ {/* Settings dropdown */}
+
+
+
+
+
+
+ updateSetting("includeClientTag", checked)
+ }
+ >
+ Include client tag
+
+
+
+
+ {/* Spacer */}
+
+
+ {/* Discard button */}
+
+
+ {/* Publish button */}
+
+
+ >
+ ) : (
+ <>
+ {/* Published event preview */}
+ {lastPublishedEvent && (
+
+
+
+ )}
+
+ {/* Reset button */}
+
+
+
+ >
+ )}
+
+ {/* Relay selection */}
+
+
+
+ Relays ({selectedRelays.size} selected)
+
+
+
+
+ {relayStates.map((relay) => {
+ // Get relay connection state from pool
+ const poolRelay = relayPoolMap?.get(relay.url);
+ const isConnected = poolRelay?.connected ?? false;
+
+ // Get relay state for auth status
+ const relayState = getRelay(relay.url);
+ const authIcon = getAuthIcon(relayState);
+
+ return (
+
+
+
toggleRelay(relay.url)}
+ disabled={isPublishing || showPublishedPreview}
+ />
+ {/* Connectivity status icon */}
+ {isConnected ? (
+
+ ) : (
+
+ )}
+ {/* Auth status icon */}
+
+ {authIcon.icon}
+
+
+
+
+ {/* Status indicator */}
+
+ {relay.status === "publishing" && (
+
+ )}
+ {relay.status === "success" && (
+
+ )}
+ {relay.status === "error" && (
+
+ )}
+
+
+ );
+ })}
+
+
+ {/* Add relay input */}
+ {!showPublishedPreview && (
+
+
setNewRelayInput(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" && isValidRelayInput(newRelayInput)) {
+ handleAddRelay();
+ }
+ }}
+ disabled={isPublishing}
+ className="flex-1 text-sm"
+ />
+
+
+ )}
+
+
+ {/* Upload dialog */}
+ {uploadDialog}
+