forked from laantungir/super_ball
.
This commit is contained in:
@@ -12,12 +12,13 @@
|
||||
|
||||
<div id="login-section">
|
||||
<h1>Superball Thrower</h1>
|
||||
<h3 style="max-width: 500px; margin: 0 auto;">Login as an existing or new Thrower, not with your personal key.</h3>
|
||||
<div id="login-container"></div>
|
||||
</div>
|
||||
|
||||
<div id="main-content" class="hidden">
|
||||
<h1>Superball Thrower</h1>
|
||||
|
||||
|
||||
<!-- Profile Section - matching superball.html presentation -->
|
||||
<img id="profile-picture">
|
||||
<div id="profile-name"></div>
|
||||
@@ -26,7 +27,7 @@
|
||||
<!-- Start Thrower Button (moved above main section) -->
|
||||
<div style="margin: 20px 0 5px 0; width: 100%;">
|
||||
<button id="daemon-toggle" class="button-primary" onclick="toggleDaemon()"
|
||||
style="width: 100%; font-size: 16px; font-weight: bold; margin-bottom: 0;">
|
||||
style="width: 100%; font-size: 16px; font-weight: bold; margin-bottom: 0;">
|
||||
<span id="daemon-button-text">Start Thrower</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -228,8 +229,9 @@
|
||||
extension: true,
|
||||
local: true,
|
||||
seedphrase: true,
|
||||
readonly: false,
|
||||
connect: true,
|
||||
remote: false,
|
||||
remote: true,
|
||||
otp: false
|
||||
},
|
||||
debug: true
|
||||
@@ -693,14 +695,14 @@
|
||||
});
|
||||
|
||||
const results = await Promise.allSettled(publishPromises);
|
||||
|
||||
|
||||
let successCount = 0;
|
||||
let failureCount = 0;
|
||||
|
||||
|
||||
results.forEach((promiseResult) => {
|
||||
if (promiseResult.status === 'fulfilled') {
|
||||
const { relayUrl, success, error } = promiseResult.value;
|
||||
|
||||
|
||||
if (success) {
|
||||
successCount++;
|
||||
console.log('SUCCESS', `✅ Relay list published successfully to ${relayUrl}`);
|
||||
@@ -716,7 +718,7 @@
|
||||
if (successCount > 0) {
|
||||
showStatus('relay-status', 'Relay configuration saved successfully!', 'success');
|
||||
console.log('SUCCESS', `Relay list published to ${successCount} out of ${relaysToUse.length} relays`);
|
||||
|
||||
|
||||
// Return to display mode after successful save
|
||||
cancelRelayEdit();
|
||||
} else {
|
||||
@@ -869,7 +871,7 @@
|
||||
try {
|
||||
const message = JSON.parse(event.data);
|
||||
console.log('INFO', `Received from ${relayUrl}:`, message);
|
||||
|
||||
|
||||
// Log ALL responses from relay in processing log
|
||||
addLogEntry('info', `📥 Response from ${relayUrl}: ${JSON.stringify(message)}`);
|
||||
|
||||
@@ -1003,7 +1005,7 @@
|
||||
|
||||
const results = await Promise.allSettled(publishPromises);
|
||||
let successCount = 0;
|
||||
|
||||
|
||||
results.forEach((promiseResult) => {
|
||||
if (promiseResult.status === 'fulfilled' && promiseResult.value.success) {
|
||||
successCount++;
|
||||
@@ -1220,11 +1222,11 @@
|
||||
const results = await Promise.allSettled(publishPromises);
|
||||
let successCount = 0;
|
||||
let failureCount = 0;
|
||||
|
||||
|
||||
results.forEach((promiseResult) => {
|
||||
if (promiseResult.status === 'fulfilled') {
|
||||
const { relayUrl, success, error } = promiseResult.value;
|
||||
|
||||
|
||||
if (success) {
|
||||
successCount++;
|
||||
console.log('SUCCESS', `✅ Thrower info published successfully to ${relayUrl}`);
|
||||
@@ -1361,11 +1363,11 @@
|
||||
|
||||
const results = await Promise.allSettled(publishPromises);
|
||||
let successCount = 0;
|
||||
|
||||
|
||||
results.forEach((promiseResult) => {
|
||||
if (promiseResult.status === 'fulfilled') {
|
||||
const { relayUrl, success, error } = promiseResult.value;
|
||||
|
||||
|
||||
if (success) {
|
||||
successCount++;
|
||||
console.log('SUCCESS', `✅ Thrower info auto-republished to ${relayUrl}`);
|
||||
@@ -1584,7 +1586,7 @@
|
||||
|
||||
// Mark this event ID as processed
|
||||
processedEventIds.add(event.id);
|
||||
|
||||
|
||||
addLogEntry('info', `Received routing event: ${event.id.substring(0, 16)}...`);
|
||||
|
||||
try {
|
||||
@@ -1686,15 +1688,15 @@
|
||||
|
||||
// DEBUG: Check authentication state before attempting decryption
|
||||
addLogEntry('info', `DEBUG AUTHENTICATION STATE CHECK:`);
|
||||
|
||||
|
||||
// Check if window.nostr exists
|
||||
addLogEntry('info', ` window.nostr exists: ${!!window.nostr}`);
|
||||
addLogEntry('info', ` window.nostr constructor: ${window.nostr?.constructor?.name}`);
|
||||
|
||||
|
||||
// Check if NOSTR_LOGIN_LITE exists and getAuthState function
|
||||
addLogEntry('info', ` window.NOSTR_LOGIN_LITE exists: ${!!window.NOSTR_LOGIN_LITE}`);
|
||||
addLogEntry('info', ` getAuthState function exists: ${!!window.NOSTR_LOGIN_LITE?.getAuthState}`);
|
||||
|
||||
|
||||
// Get current auth state
|
||||
let authState = null;
|
||||
try {
|
||||
@@ -1951,7 +1953,7 @@
|
||||
try {
|
||||
// Wait for all publishing attempts to complete
|
||||
const results = await Promise.allSettled(publishPromises);
|
||||
|
||||
|
||||
let successCount = 0;
|
||||
let failureCount = 0;
|
||||
const successfulRelays = [];
|
||||
@@ -1961,7 +1963,7 @@
|
||||
results.forEach((promiseResult, index) => {
|
||||
if (promiseResult.status === 'fulfilled') {
|
||||
const { relayUrl, success, result, error } = promiseResult.value;
|
||||
|
||||
|
||||
if (success) {
|
||||
successCount++;
|
||||
successfulRelays.push(relayUrl);
|
||||
@@ -1985,7 +1987,7 @@
|
||||
|
||||
if (successCount > 0) {
|
||||
addLogEntry('success', `Successfully published to: ${successfulRelays.join(', ')}`);
|
||||
|
||||
|
||||
// Log full published event (only once for successful publications)
|
||||
addLogEntry('info', `Full published event:\n${JSON.stringify(event, null, 2)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user