File size: 5,389 Bytes
90e733d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
class CustomBotList extends HTMLElement {
    connectedCallback() {
        this.attachShadow({ mode: 'open' });
        this.shadowRoot.innerHTML = `
            <style>
                .bot-list {
                    display: flex;
                    flex-direction: column;
                    gap: 0.75rem;
                }
                
                .bot-card {
                    background: rgba(15, 17, 21, 0.8);
                    border: 1px solid #4a5568;
                    padding: 0.75rem;
                    position: relative;
                }
                
                .bot-card.online {
                    border-left: 2px solid #ff9f1c;
                }
                
                .bot-card.offline {
                    opacity: 0.5;
                }
                
                .bot-header {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-bottom: 0.5rem;
                }
                
                .bot-name {
                    font-size: 0.875rem;
                    font-weight: 600;
                    color: #ff9f1c;
                }
                
                .bot-status {
                    font-size: 0.75rem;
                    text-transform: uppercase;
                }
                
                .status-online {
                    color: #ff9f1c;
                    animation: pulse-amber 2s infinite;
                }
                
                .status-offline {
                    color: #4a5568;
                }
                
                .health-gauge {
                    display: flex;
                    gap: 1px;
                    margin: 0.5rem 0;
                }
                
                .gauge-segment {
                    height: 6px;
                    flex: 1;
                    background: #4a5568;
                }
                
                .gauge-segment.active {
                    background: #ff9f1c;
                }
                
                .gauge-segment.warning {
                    background: #dc2626;
                }
                
                .bot-actions {
                    display: flex;
                    gap: 0.5rem;
                    margin-top: 0.5rem;
                }
                
                .action-btn {
                    background: transparent;
                    border: 1px solid #4a5568;
                    color: #4a5568;
                    padding: 0.25rem 0.5rem;
                    font-size: 0.75rem;
                    cursor: pointer;
                    transition: all 0.3s ease;
                }
                
                .action-btn:hover {
                    border-color: #ff9f1c;
                    color: #ff9f1c;
                }
                
                @keyframes pulse-amber {
                    0%, 100% { opacity: 1; }
                    50% { opacity: 0.5; }
                }
            </style>
            <div class="bot-list">
                <div class="bot-card online">
                    <div class="bot-header">
                        <span class="bot-name">ALPHA-WOLF</span>
                        <span class="bot-status status-online">[ONLINE]</span>
                    </div>
                    <div class="health-gauge">
                        ${Array(10).fill().map((_, i) => 
                            `<div class="gauge-segment ${i < 8 ? 'active' : ''}"></div>`
                        ).join('')}
                    </div>
                    <div class="bot-actions">
                        <button class="action-btn">SLEEP</button>
                        <button class="action-btn">SCAN</button>
                    </div>
                </div>
                
                <div class="bot-card online">
                    <div class="bot-header">
                        <span class="bot-name">GHOST-RIDER</span>
                        <span class="bot-status status-online">[ONLINE]</span>
                    </div>
                    <div class="health-gauge">
                        ${Array(10).fill().map((_, i) => 
                            `<div class="gauge-segment ${i < 6 ? 'active' : ''}"></div>`
                        ).join('')}
                    </div>
                    <div class="bot-actions">
                        <button class="action-btn">SLEEP</button>
                        <button class="action-btn">SCAN</button>
                    </div>
                </div>
                
                <div class="bot-card offline">
                    <div class="bot-header">
                        <span class="bot-name">ECHO-SENTINEL</span>
                        <span class="bot-status status-offline">[OFFLINE]</span>
                    </div>
                    <div class="health-gauge">
                        ${Array(10).fill().map(() => 
                            `<div class="gauge-segment"></div>`
                        ).join('')}
                    </div>
                    <div class="bot-actions">
                        <button class="action-btn">WAKE</button>
                    </div>
                </div>
            </div>
        `;
    }
}

customElements.define('custom-bot-list', CustomBotList);