peerpigeon 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -1
- package/examples/browser/app.js +3 -2
- package/examples/browser/index.html +163 -0
- package/examples/browser/styles.css +279 -47
- package/examples/browser/ui.js +560 -14
- package/examples/node/README.md +110 -0
- package/examples/node/basic-storage-example.js +90 -0
- package/examples/node/package.json +17 -0
- package/examples/node/storage-test.js +520 -0
- package/index.js +10 -9
- package/package.json +4 -2
- package/src/DistributedStorageManager.js +1334 -0
- package/src/PeerPigeonMesh.js +41 -0
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
- **🧠 Smart Eviction Strategy**: Automatically replaces distant peers with closer ones to optimize mesh topology
|
|
17
17
|
- **🔍 Auto-Discovery**: Seamlessly connects to peers as they join the network
|
|
18
18
|
- **⚡ WebSocket Signaling**: Real-time bidirectional communication for optimal performance
|
|
19
|
-
-
|
|
19
|
+
- **🗄️ Distributed Hash Table (WebDHT)**: Store and retrieve data across the mesh with automatic replication
|
|
20
|
+
- **📦 Distributed Storage Layer**: Encrypted, access-controlled storage with CRDT support for collaborative editing
|
|
20
21
|
- **🎥 Media Streaming**: Built-in support for audio/video streaming between peers
|
|
21
22
|
- **💬 Messaging System**: Direct messages and broadcast gossip protocol messaging
|
|
22
23
|
- **🔧 Modular Architecture**: Clean separation of concerns with event-driven components
|
|
@@ -170,6 +171,63 @@ mesh.addEventListener('dhtValueChanged', (data) => {
|
|
|
170
171
|
await mesh.dhtUpdate('shared-counter', 42);
|
|
171
172
|
```
|
|
172
173
|
|
|
174
|
+
### Distributed Storage Layer Examples
|
|
175
|
+
|
|
176
|
+
```javascript
|
|
177
|
+
// Enable crypto for encryption support
|
|
178
|
+
const mesh = new PeerPigeonMesh({
|
|
179
|
+
enableCrypto: true,
|
|
180
|
+
enableWebDHT: true
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
await mesh.cryptoManager.init();
|
|
184
|
+
await mesh.connect('ws://localhost:3000');
|
|
185
|
+
|
|
186
|
+
// Store private encrypted data
|
|
187
|
+
await mesh.distributedStorage.store('user:profile', {
|
|
188
|
+
name: 'Alice',
|
|
189
|
+
email: 'alice@example.com'
|
|
190
|
+
}, {
|
|
191
|
+
isPublic: false, // Private (encrypted)
|
|
192
|
+
isImmutable: false // Mutable for owner
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// Store public data
|
|
196
|
+
await mesh.distributedStorage.store('app:config', {
|
|
197
|
+
version: '1.0.0',
|
|
198
|
+
features: ['chat', 'files']
|
|
199
|
+
}, {
|
|
200
|
+
isPublic: true, // Public (not encrypted)
|
|
201
|
+
isImmutable: true // Immutable for other peers
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// Store collaborative document with CRDT
|
|
205
|
+
await mesh.distributedStorage.store('doc:shared', {
|
|
206
|
+
title: 'Shared Document',
|
|
207
|
+
content: 'Initial content'
|
|
208
|
+
}, {
|
|
209
|
+
isPublic: true,
|
|
210
|
+
enableCRDT: true // Enable collaborative editing
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// Grant access to private data
|
|
214
|
+
await mesh.distributedStorage.grantAccess('user:profile', otherPeer.peerId);
|
|
215
|
+
|
|
216
|
+
// Retrieve data
|
|
217
|
+
const profile = await mesh.distributedStorage.retrieve('user:profile');
|
|
218
|
+
|
|
219
|
+
// Update data (owner only, or CRDT-enabled)
|
|
220
|
+
await mesh.distributedStorage.update('user:profile', {
|
|
221
|
+
name: 'Alice Smith',
|
|
222
|
+
email: 'alice.smith@example.com'
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// Listen for storage events
|
|
226
|
+
mesh.addEventListener('storageDataUpdated', (event) => {
|
|
227
|
+
console.log(`Data updated: ${event.key} (version ${event.version})`);
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
173
231
|
### Media Streaming Examples
|
|
174
232
|
|
|
175
233
|
```javascript
|
package/examples/browser/app.js
CHANGED
|
@@ -3,10 +3,11 @@ import { PeerPigeonUI } from './ui.js';
|
|
|
3
3
|
|
|
4
4
|
class PeerPigeonApp {
|
|
5
5
|
constructor() {
|
|
6
|
-
// Initialize mesh with crypto and
|
|
6
|
+
// Initialize mesh with crypto, WebDHT, and distributed storage enabled
|
|
7
7
|
this.mesh = new PeerPigeonMesh({
|
|
8
8
|
enableWebDHT: true,
|
|
9
|
-
enableCrypto: true
|
|
9
|
+
enableCrypto: true,
|
|
10
|
+
enableDistributedStorage: true
|
|
10
11
|
});
|
|
11
12
|
|
|
12
13
|
this.ui = new PeerPigeonUI(this.mesh);
|
|
@@ -484,6 +484,169 @@
|
|
|
484
484
|
</div>
|
|
485
485
|
</div>
|
|
486
486
|
|
|
487
|
+
<div class="storage" aria-expanded="false">
|
|
488
|
+
<div class="section-header">
|
|
489
|
+
<h2>
|
|
490
|
+
<button id="storage-toggle" class="toggle-btn" aria-expanded="false">
|
|
491
|
+
▶ Distributed Storage - Encrypted P2P Storage Layer
|
|
492
|
+
</button>
|
|
493
|
+
</h2>
|
|
494
|
+
</div>
|
|
495
|
+
<div id="storage-content" class="collapsible-content" style="display: none;">
|
|
496
|
+
<!-- Storage Status -->
|
|
497
|
+
<div class="storage-status">
|
|
498
|
+
<h3>Storage Status</h3>
|
|
499
|
+
<div class="info-group">
|
|
500
|
+
<label>Storage Layer:</label>
|
|
501
|
+
<span id="storage-status">Disabled</span>
|
|
502
|
+
</div>
|
|
503
|
+
<div class="info-group">
|
|
504
|
+
<label>Stored Items:</label>
|
|
505
|
+
<span id="storage-item-count">0</span>
|
|
506
|
+
</div>
|
|
507
|
+
<div class="info-group">
|
|
508
|
+
<label>Total Size:</label>
|
|
509
|
+
<span id="storage-total-size">0 bytes</span>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
|
|
513
|
+
<!-- Storage Controls -->
|
|
514
|
+
<div class="storage-controls">
|
|
515
|
+
<h3>Storage Controls</h3>
|
|
516
|
+
<div class="button-group">
|
|
517
|
+
<button id="storage-enable-btn" class="btn primary">Enable Storage</button>
|
|
518
|
+
<button id="storage-disable-btn" class="btn warning">Disable Storage</button>
|
|
519
|
+
<button id="storage-clear-btn" class="btn quaternary">Clear All</button>
|
|
520
|
+
</div>
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+
<!-- Store Data -->
|
|
524
|
+
<div class="storage-operations">
|
|
525
|
+
<h3>Store Data</h3>
|
|
526
|
+
<div class="input-group">
|
|
527
|
+
<label for="storage-key">Key:</label>
|
|
528
|
+
<input type="text" id="storage-key" placeholder="Storage key">
|
|
529
|
+
</div>
|
|
530
|
+
<div class="input-group">
|
|
531
|
+
<label for="storage-value">Value:</label>
|
|
532
|
+
<textarea id="storage-value" placeholder="Data to store (JSON or text)" rows="3"></textarea>
|
|
533
|
+
</div>
|
|
534
|
+
|
|
535
|
+
<!-- Storage Options -->
|
|
536
|
+
<div class="storage-options">
|
|
537
|
+
<h4>Storage Options</h4>
|
|
538
|
+
<div class="input-group">
|
|
539
|
+
<label class="checkbox-label">
|
|
540
|
+
<input type="checkbox" id="storage-encrypt" checked>
|
|
541
|
+
<span class="checkmark"></span>
|
|
542
|
+
Encrypt data
|
|
543
|
+
</label>
|
|
544
|
+
</div>
|
|
545
|
+
<div class="input-group">
|
|
546
|
+
<label class="checkbox-label">
|
|
547
|
+
<input type="checkbox" id="storage-public">
|
|
548
|
+
<span class="checkmark"></span>
|
|
549
|
+
Public access (readable by anyone)
|
|
550
|
+
</label>
|
|
551
|
+
</div>
|
|
552
|
+
<div class="input-group">
|
|
553
|
+
<label class="checkbox-label">
|
|
554
|
+
<input type="checkbox" id="storage-immutable">
|
|
555
|
+
<span class="checkmark"></span>
|
|
556
|
+
Immutable (cannot be updated)
|
|
557
|
+
</label>
|
|
558
|
+
</div>
|
|
559
|
+
<div class="input-group">
|
|
560
|
+
<label class="checkbox-label">
|
|
561
|
+
<input type="checkbox" id="storage-crdt">
|
|
562
|
+
<span class="checkmark"></span>
|
|
563
|
+
Enable CRDT (conflict-free updates)
|
|
564
|
+
</label>
|
|
565
|
+
</div>
|
|
566
|
+
<div class="input-group">
|
|
567
|
+
<label for="storage-ttl">TTL (seconds, 0 = no expiration):</label>
|
|
568
|
+
<input type="number" id="storage-ttl" value="0" min="0">
|
|
569
|
+
</div>
|
|
570
|
+
</div>
|
|
571
|
+
|
|
572
|
+
<div class="button-group">
|
|
573
|
+
<button id="storage-store-btn" class="btn primary">Store Data</button>
|
|
574
|
+
<button id="storage-update-btn" class="btn secondary">Update Data</button>
|
|
575
|
+
</div>
|
|
576
|
+
</div>
|
|
577
|
+
|
|
578
|
+
<!-- Retrieve Data -->
|
|
579
|
+
<div class="storage-retrieve">
|
|
580
|
+
<h3>Retrieve Data</h3>
|
|
581
|
+
<div class="input-group horizontal">
|
|
582
|
+
<input type="text" id="storage-get-key" placeholder="Key to retrieve">
|
|
583
|
+
<button id="storage-get-btn" class="btn secondary">Get Data</button>
|
|
584
|
+
<button id="storage-delete-btn" class="btn warning">Delete</button>
|
|
585
|
+
</div>
|
|
586
|
+
</div>
|
|
587
|
+
|
|
588
|
+
<!-- Access Control -->
|
|
589
|
+
<div class="storage-access">
|
|
590
|
+
<h3>Access Control</h3>
|
|
591
|
+
<div class="input-group horizontal">
|
|
592
|
+
<input type="text" id="storage-access-key" placeholder="Key for access control">
|
|
593
|
+
<input type="text" id="storage-access-peer" placeholder="Peer ID to grant access">
|
|
594
|
+
<select id="storage-access-level">
|
|
595
|
+
<option value="read">Read</option>
|
|
596
|
+
<option value="write">Write</option>
|
|
597
|
+
<option value="admin">Admin</option>
|
|
598
|
+
</select>
|
|
599
|
+
<button id="storage-grant-access-btn" class="btn tertiary">Grant Access</button>
|
|
600
|
+
</div>
|
|
601
|
+
<div class="input-group horizontal">
|
|
602
|
+
<input type="text" id="storage-revoke-key" placeholder="Key for access revocation">
|
|
603
|
+
<input type="text" id="storage-revoke-peer" placeholder="Peer ID to revoke access">
|
|
604
|
+
<button id="storage-revoke-access-btn" class="btn quaternary">Revoke Access</button>
|
|
605
|
+
</div>
|
|
606
|
+
</div>
|
|
607
|
+
|
|
608
|
+
<!-- Bulk Operations -->
|
|
609
|
+
<div class="storage-bulk">
|
|
610
|
+
<h3>Bulk Operations</h3>
|
|
611
|
+
<div class="input-group horizontal">
|
|
612
|
+
<input type="text" id="storage-prefix" placeholder="Key prefix for bulk operations">
|
|
613
|
+
<button id="storage-list-btn" class="btn tertiary">List Keys</button>
|
|
614
|
+
<button id="storage-bulk-delete-btn" class="btn warning">Bulk Delete</button>
|
|
615
|
+
</div>
|
|
616
|
+
</div>
|
|
617
|
+
|
|
618
|
+
<!-- Search -->
|
|
619
|
+
<div class="storage-search">
|
|
620
|
+
<h3>Search</h3>
|
|
621
|
+
<div class="input-group horizontal">
|
|
622
|
+
<input type="text" id="storage-search-query" placeholder="Search query">
|
|
623
|
+
<select id="storage-search-type">
|
|
624
|
+
<option value="key">Search Keys</option>
|
|
625
|
+
<option value="value">Search Values</option>
|
|
626
|
+
<option value="metadata">Search Metadata</option>
|
|
627
|
+
</select>
|
|
628
|
+
<button id="storage-search-btn" class="btn tertiary">Search</button>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
|
|
632
|
+
<!-- Backup/Restore -->
|
|
633
|
+
<div class="storage-backup">
|
|
634
|
+
<h3>Backup & Restore</h3>
|
|
635
|
+
<div class="button-group">
|
|
636
|
+
<button id="storage-backup-btn" class="btn tertiary">Create Backup</button>
|
|
637
|
+
<button id="storage-restore-btn" class="btn tertiary">Restore from Backup</button>
|
|
638
|
+
</div>
|
|
639
|
+
<input type="file" id="storage-restore-file" accept=".json" style="display: none;">
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
<!-- Storage Log -->
|
|
643
|
+
<div class="storage-results">
|
|
644
|
+
<h3>Storage Operations Log</h3>
|
|
645
|
+
<div id="storage-log" class="storage-log"></div>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
|
|
487
650
|
<div class="messages">
|
|
488
651
|
<h2>Messages</h2>
|
|
489
652
|
<div class="input-group horizontal">
|
|
@@ -82,21 +82,68 @@ main {
|
|
|
82
82
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
/* Base styles for all collapsible sections */
|
|
86
|
+
.discovered-peers,
|
|
87
|
+
.connected-peers,
|
|
88
|
+
.manual-connection,
|
|
89
|
+
.settings,
|
|
90
|
+
.media,
|
|
91
|
+
.dht,
|
|
92
|
+
.crypto,
|
|
93
|
+
.storage {
|
|
86
94
|
background: white;
|
|
87
95
|
padding: 20px;
|
|
88
96
|
border-radius: 8px;
|
|
89
97
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
margin-bottom: 20px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Individual section color schemes */
|
|
102
|
+
.discovered-peers {
|
|
103
|
+
border-left: 4px solid #3498db;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.discovered-peers .section-header h2 {
|
|
107
|
+
color: #3498db;
|
|
108
|
+
border-bottom: 2px solid #3498db;
|
|
109
|
+
padding-bottom: 8px;
|
|
110
|
+
margin-bottom: 20px;
|
|
111
|
+
font-size: 1.1em;
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.discovered-peers .toggle-btn {
|
|
116
|
+
color: #3498db;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.discovered-peers .toggle-btn:hover {
|
|
120
|
+
color: #2980b9;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.connected-peers {
|
|
124
|
+
border-left: 4px solid #2ecc71;
|
|
93
125
|
}
|
|
94
126
|
|
|
127
|
+
.connected-peers .section-header h2 {
|
|
128
|
+
color: #2ecc71;
|
|
129
|
+
border-bottom: 2px solid #2ecc71;
|
|
130
|
+
padding-bottom: 8px;
|
|
131
|
+
margin-bottom: 20px;
|
|
132
|
+
font-size: 1.1em;
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.connected-peers .toggle-btn {
|
|
137
|
+
color: #2ecc71;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.connected-peers .toggle-btn:hover {
|
|
141
|
+
color: #27ae60;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* General h2 styling - overridden by specific section styles */
|
|
95
145
|
h2 {
|
|
96
146
|
margin-bottom: 15px;
|
|
97
|
-
color: #2c3e50;
|
|
98
|
-
border-bottom: 2px solid #ecf0f1;
|
|
99
|
-
padding-bottom: 5px;
|
|
100
147
|
}
|
|
101
148
|
|
|
102
149
|
.info-group,
|
|
@@ -112,7 +159,9 @@ label {
|
|
|
112
159
|
}
|
|
113
160
|
|
|
114
161
|
input[type="text"],
|
|
115
|
-
input[type="url"]
|
|
162
|
+
input[type="url"],
|
|
163
|
+
input[type="number"],
|
|
164
|
+
textarea {
|
|
116
165
|
width: 100%;
|
|
117
166
|
padding: 10px;
|
|
118
167
|
border: 2px solid #ecf0f1;
|
|
@@ -120,10 +169,13 @@ input[type="url"] {
|
|
|
120
169
|
font-size: 14px;
|
|
121
170
|
color: #333;
|
|
122
171
|
transition: border-color 0.3s;
|
|
172
|
+
font-family: inherit;
|
|
123
173
|
}
|
|
124
174
|
|
|
125
175
|
input[type="text"]:focus,
|
|
126
|
-
input[type="url"]:focus
|
|
176
|
+
input[type="url"]:focus,
|
|
177
|
+
input[type="number"]:focus,
|
|
178
|
+
textarea:focus {
|
|
127
179
|
outline: none;
|
|
128
180
|
border-color: #3498db;
|
|
129
181
|
}
|
|
@@ -434,23 +486,55 @@ input[type="url"]:focus {
|
|
|
434
486
|
}
|
|
435
487
|
|
|
436
488
|
.manual-connection {
|
|
437
|
-
background: white;
|
|
438
|
-
padding: 20px;
|
|
439
|
-
border-radius: 8px;
|
|
440
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
441
489
|
border-left: 4px solid #e74c3c;
|
|
442
490
|
}
|
|
443
491
|
|
|
444
|
-
.manual-connection h2 {
|
|
492
|
+
.manual-connection .section-header h2 {
|
|
493
|
+
color: #e74c3c;
|
|
494
|
+
border-bottom: 2px solid #e74c3c;
|
|
495
|
+
padding-bottom: 8px;
|
|
496
|
+
margin-bottom: 20px;
|
|
497
|
+
font-size: 1.1em;
|
|
498
|
+
font-weight: 600;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.manual-connection .toggle-btn {
|
|
445
502
|
color: #e74c3c;
|
|
446
503
|
}
|
|
447
504
|
|
|
505
|
+
.manual-connection .toggle-btn:hover {
|
|
506
|
+
color: #c0392b;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.settings {
|
|
510
|
+
border-left: 4px solid #95a5a6;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.settings .section-header h2 {
|
|
514
|
+
color: #95a5a6;
|
|
515
|
+
border-bottom: 2px solid #95a5a6;
|
|
516
|
+
padding-bottom: 8px;
|
|
517
|
+
margin-bottom: 20px;
|
|
518
|
+
font-size: 1.1em;
|
|
519
|
+
font-weight: 600;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.settings .toggle-btn {
|
|
523
|
+
color: #95a5a6;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.settings .toggle-btn:hover {
|
|
527
|
+
color: #7f8c8d;
|
|
528
|
+
}
|
|
529
|
+
|
|
448
530
|
/* Make collapsed sections compact line items */
|
|
449
531
|
.discovered-peers[aria-expanded="false"],
|
|
450
532
|
.settings[aria-expanded="false"],
|
|
451
533
|
.manual-connection[aria-expanded="false"],
|
|
452
534
|
.connected-peers[aria-expanded="false"],
|
|
453
535
|
.dht[aria-expanded="false"],
|
|
536
|
+
.crypto[aria-expanded="false"],
|
|
537
|
+
.storage[aria-expanded="false"],
|
|
454
538
|
.media[aria-expanded="false"] {
|
|
455
539
|
background: none !important;
|
|
456
540
|
border: none !important;
|
|
@@ -467,23 +551,23 @@ input[type="url"]:focus {
|
|
|
467
551
|
.connected-peers[aria-expanded="false"] .section-header,
|
|
468
552
|
.dht[aria-expanded="false"] .section-header,
|
|
469
553
|
.crypto[aria-expanded="false"] .section-header,
|
|
554
|
+
.storage[aria-expanded="false"] .section-header,
|
|
470
555
|
.media[aria-expanded="false"] .section-header {
|
|
471
556
|
margin: 0;
|
|
472
557
|
padding: 0;
|
|
473
558
|
}
|
|
474
559
|
|
|
475
|
-
|
|
476
|
-
.
|
|
477
|
-
.
|
|
478
|
-
.
|
|
479
|
-
.
|
|
480
|
-
.
|
|
481
|
-
.
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
padding: 2px 0 !important;
|
|
560
|
+
/* Collapsed sections preserve their colors but are more compact */
|
|
561
|
+
.discovered-peers[aria-expanded="false"] .toggle-btn,
|
|
562
|
+
.settings[aria-expanded="false"] .toggle-btn,
|
|
563
|
+
.manual-connection[aria-expanded="false"] .toggle-btn,
|
|
564
|
+
.connected-peers[aria-expanded="false"] .toggle-btn,
|
|
565
|
+
.media[aria-expanded="false"] .toggle-btn,
|
|
566
|
+
.dht[aria-expanded="false"] .toggle-btn,
|
|
567
|
+
.crypto[aria-expanded="false"] .toggle-btn,
|
|
568
|
+
.storage[aria-expanded="false"] .toggle-btn {
|
|
485
569
|
font-size: 0.9em !important;
|
|
486
|
-
|
|
570
|
+
padding: 2px 8px !important;
|
|
487
571
|
}
|
|
488
572
|
|
|
489
573
|
/* Toggle functionality styles */
|
|
@@ -492,15 +576,6 @@ input[type="url"]:focus {
|
|
|
492
576
|
margin: 10px 0 5px 0;
|
|
493
577
|
}
|
|
494
578
|
|
|
495
|
-
.section-header h2 {
|
|
496
|
-
display: flex;
|
|
497
|
-
align-items: center;
|
|
498
|
-
gap: 8px;
|
|
499
|
-
margin: 0;
|
|
500
|
-
font-size: 1.1em;
|
|
501
|
-
font-weight: 600;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
579
|
.toggle-btn {
|
|
505
580
|
background: none;
|
|
506
581
|
border: none;
|
|
@@ -799,18 +874,26 @@ input[type="url"]:focus {
|
|
|
799
874
|
|
|
800
875
|
/* Media Controls Styles */
|
|
801
876
|
.media {
|
|
802
|
-
background: white;
|
|
803
|
-
padding: 20px;
|
|
804
|
-
border-radius: 8px;
|
|
805
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
806
|
-
margin-bottom: 20px;
|
|
807
877
|
border-left: 4px solid #f39c12;
|
|
808
878
|
}
|
|
809
879
|
|
|
810
|
-
.media h2 {
|
|
880
|
+
.media .section-header h2 {
|
|
881
|
+
color: #f39c12;
|
|
882
|
+
border-bottom: 2px solid #f39c12;
|
|
883
|
+
padding-bottom: 8px;
|
|
884
|
+
margin-bottom: 20px;
|
|
885
|
+
font-size: 1.1em;
|
|
886
|
+
font-weight: 600;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.media .toggle-btn {
|
|
811
890
|
color: #f39c12;
|
|
812
891
|
}
|
|
813
892
|
|
|
893
|
+
.media .toggle-btn:hover {
|
|
894
|
+
color: #e67e22;
|
|
895
|
+
}
|
|
896
|
+
|
|
814
897
|
.media-controls {
|
|
815
898
|
background: white;
|
|
816
899
|
border-radius: 8px;
|
|
@@ -1003,18 +1086,26 @@ input[type="url"]:focus {
|
|
|
1003
1086
|
|
|
1004
1087
|
/* DHT Styles */
|
|
1005
1088
|
.dht {
|
|
1006
|
-
background: white;
|
|
1007
|
-
padding: 20px;
|
|
1008
|
-
border-radius: 8px;
|
|
1009
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
1010
|
-
margin-bottom: 20px;
|
|
1011
1089
|
border-left: 4px solid #9b59b6;
|
|
1012
1090
|
}
|
|
1013
1091
|
|
|
1014
|
-
.dht h2 {
|
|
1092
|
+
.dht .section-header h2 {
|
|
1093
|
+
color: #9b59b6;
|
|
1094
|
+
border-bottom: 2px solid #9b59b6;
|
|
1095
|
+
padding-bottom: 8px;
|
|
1096
|
+
margin-bottom: 20px;
|
|
1097
|
+
font-size: 1.1em;
|
|
1098
|
+
font-weight: 600;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
.dht .toggle-btn {
|
|
1015
1102
|
color: #9b59b6;
|
|
1016
1103
|
}
|
|
1017
1104
|
|
|
1105
|
+
.dht .toggle-btn:hover {
|
|
1106
|
+
color: #8e44ad;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1018
1109
|
.dht-actions {
|
|
1019
1110
|
margin-bottom: 20px;
|
|
1020
1111
|
padding: 15px;
|
|
@@ -1291,7 +1382,24 @@ input[type="url"]:focus {
|
|
|
1291
1382
|
|
|
1292
1383
|
/* Crypto Section Styles */
|
|
1293
1384
|
.crypto {
|
|
1294
|
-
|
|
1385
|
+
border-left: 4px solid #e67e22;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
.crypto .section-header h2 {
|
|
1389
|
+
color: #e67e22;
|
|
1390
|
+
border-bottom: 2px solid #e67e22;
|
|
1391
|
+
padding-bottom: 8px;
|
|
1392
|
+
margin-bottom: 20px;
|
|
1393
|
+
font-size: 1.1em;
|
|
1394
|
+
font-weight: 600;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
.crypto .toggle-btn {
|
|
1398
|
+
color: #e67e22;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.crypto .toggle-btn:hover {
|
|
1402
|
+
color: #d35400;
|
|
1295
1403
|
}
|
|
1296
1404
|
|
|
1297
1405
|
.crypto-status .info-group {
|
|
@@ -1502,3 +1610,127 @@ input[type="url"]:focus {
|
|
|
1502
1610
|
max-width: 200px;
|
|
1503
1611
|
}
|
|
1504
1612
|
}
|
|
1613
|
+
|
|
1614
|
+
/* Distributed Storage Styles */
|
|
1615
|
+
.storage {
|
|
1616
|
+
border-left: 4px solid #17a2b8;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.storage .section-header h2 {
|
|
1620
|
+
color: #17a2b8;
|
|
1621
|
+
border-bottom: 2px solid #17a2b8;
|
|
1622
|
+
padding-bottom: 8px;
|
|
1623
|
+
margin-bottom: 20px;
|
|
1624
|
+
font-size: 1.1em;
|
|
1625
|
+
font-weight: 600;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
.storage .toggle-btn {
|
|
1629
|
+
color: #17a2b8;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
.storage .toggle-btn:hover {
|
|
1633
|
+
color: #138496;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
.storage-status {
|
|
1637
|
+
background: #f8f9fa;
|
|
1638
|
+
padding: 15px;
|
|
1639
|
+
border-radius: 6px;
|
|
1640
|
+
margin-bottom: 20px;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
.storage-controls {
|
|
1644
|
+
margin-bottom: 20px;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
.storage-operations {
|
|
1648
|
+
margin-bottom: 20px;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
.storage-options {
|
|
1652
|
+
background: #f8f9fa;
|
|
1653
|
+
padding: 15px;
|
|
1654
|
+
border-radius: 6px;
|
|
1655
|
+
margin: 15px 0;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.storage-options h4 {
|
|
1659
|
+
margin-bottom: 15px;
|
|
1660
|
+
color: #495057;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
.storage-retrieve {
|
|
1664
|
+
margin-bottom: 20px;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
.storage-access {
|
|
1668
|
+
margin-bottom: 20px;
|
|
1669
|
+
background: #fff3cd;
|
|
1670
|
+
padding: 15px;
|
|
1671
|
+
border-radius: 6px;
|
|
1672
|
+
border-left: 4px solid #ffc107;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
.storage-access h3 {
|
|
1676
|
+
color: #856404;
|
|
1677
|
+
margin-bottom: 15px;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
.storage-bulk {
|
|
1681
|
+
margin-bottom: 20px;
|
|
1682
|
+
background: #f8d7da;
|
|
1683
|
+
padding: 15px;
|
|
1684
|
+
border-radius: 6px;
|
|
1685
|
+
border-left: 4px solid #dc3545;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
.storage-bulk h3 {
|
|
1689
|
+
color: #721c24;
|
|
1690
|
+
margin-bottom: 15px;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
.storage-search {
|
|
1694
|
+
margin-bottom: 20px;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
.storage-backup {
|
|
1698
|
+
margin-bottom: 20px;
|
|
1699
|
+
background: #d1ecf1;
|
|
1700
|
+
padding: 15px;
|
|
1701
|
+
border-radius: 6px;
|
|
1702
|
+
border-left: 4px solid #0dcaf0;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
.storage-backup h3 {
|
|
1706
|
+
color: #055160;
|
|
1707
|
+
margin-bottom: 15px;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.storage-results {
|
|
1711
|
+
margin-top: 20px;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.storage-log {
|
|
1715
|
+
background: #f8f9fa;
|
|
1716
|
+
border: 1px solid #dee2e6;
|
|
1717
|
+
border-radius: 6px;
|
|
1718
|
+
padding: 15px;
|
|
1719
|
+
height: 200px;
|
|
1720
|
+
overflow-y: auto;
|
|
1721
|
+
font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
|
|
1722
|
+
font-size: 0.9em;
|
|
1723
|
+
line-height: 1.4;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.storage-log .log-entry {
|
|
1727
|
+
margin-bottom: 5px;
|
|
1728
|
+
padding: 2px 0;
|
|
1729
|
+
word-wrap: break-word;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
.storage-log:empty::before {
|
|
1733
|
+
content: "No storage operations yet...";
|
|
1734
|
+
color: #6c757d;
|
|
1735
|
+
font-style: italic;
|
|
1736
|
+
}
|