@lethevimlet/sshift 0.2.0
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/LICENSE +21 -0
- package/README.md +1146 -0
- package/example.config.json +162 -0
- package/package.json +74 -0
- package/src/server/endpoints/index.js +12 -0
- package/src/server/endpoints/rest/bookmarks.js +106 -0
- package/src/server/endpoints/rest/config.js +65 -0
- package/src/server/endpoints/rest/folders.js +127 -0
- package/src/server/endpoints/rest/index.js +32 -0
- package/src/server/endpoints/rest/sessions.js +113 -0
- package/src/server/endpoints/rest/system.js +211 -0
- package/src/server/endpoints/ws/index.js +46 -0
- package/src/server/endpoints/ws/layout.js +43 -0
- package/src/server/endpoints/ws/sftp.js +156 -0
- package/src/server/endpoints/ws/ssh.js +180 -0
- package/src/server/endpoints/ws/tabs.js +211 -0
- package/src/server/index.js +127 -0
- package/src/server/services/index.js +12 -0
- package/src/server/services/sftp-manager.js +266 -0
- package/src/server/services/ssh-manager.js +527 -0
- package/src/server/utils/config.js +171 -0
- package/src/server/utils/env-loader.js +29 -0
- package/src/server/utils/index.js +14 -0
- package/src/server/utils/tab-manager.js +266 -0
- package/src/webapp/css/style.css +3819 -0
- package/src/webapp/index.html +1008 -0
- package/src/webapp/js/app.js +8308 -0
- package/src/webapp/layouts.json +128 -0
- package/src/webapp/libs/font-awesome/css/all.min.css +9 -0
- package/src/webapp/libs/font-awesome/webfonts/fa-brands-400.ttf +0 -0
- package/src/webapp/libs/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
- package/src/webapp/libs/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- package/src/webapp/libs/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
- package/src/webapp/libs/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- package/src/webapp/libs/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
- package/src/webapp/libs/lucide/lucide.min.js +12 -0
- package/src/webapp/libs/xterm/xterm-addon-fit.js +2 -0
- package/src/webapp/libs/xterm/xterm-addon-search.js +2 -0
- package/src/webapp/libs/xterm/xterm-addon-serialize.js +2 -0
- package/src/webapp/libs/xterm/xterm-addon-web-links.js +2 -0
- package/src/webapp/libs/xterm/xterm.css +209 -0
- package/src/webapp/libs/xterm/xterm.js +2 -0
- package/sshift +269 -0
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob:;">
|
|
7
|
+
<title>SSHIFT - SSH & SFTP Terminal Client</title>
|
|
8
|
+
<!-- Local resources for offline support -->
|
|
9
|
+
<link rel="stylesheet" href="/libs/xterm/xterm.css">
|
|
10
|
+
<link rel="stylesheet" href="/libs/font-awesome/css/all.min.css">
|
|
11
|
+
<link rel="stylesheet" href="/css/style.css">
|
|
12
|
+
<script src="/libs/lucide/lucide.min.js"></script>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div class="app-container">
|
|
16
|
+
<!-- Header -->
|
|
17
|
+
<header class="header">
|
|
18
|
+
<div class="header-left">
|
|
19
|
+
<button class="btn btn-icon menu-btn" id="menuBtn" title="Toggle Sidebar">
|
|
20
|
+
<i class="fas fa-bars desktop-menu-icon"></i>
|
|
21
|
+
<i class="fas fa-bookmark mobile-menu-icon"></i>
|
|
22
|
+
</button>
|
|
23
|
+
<h1 class="logo">
|
|
24
|
+
<i class="fas fa-terminal"></i>
|
|
25
|
+
<span class="logo-text">SSHIFT</span>
|
|
26
|
+
</h1>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="header-right">
|
|
29
|
+
<!-- Primary action buttons - always visible -->
|
|
30
|
+
<button class="btn btn-icon" id="newSshBtn" title="New SSH Connection">
|
|
31
|
+
<i class="fas fa-plug"></i>
|
|
32
|
+
<span class="btn-text">SSH</span>
|
|
33
|
+
</button>
|
|
34
|
+
<button class="btn btn-icon" id="newSftpBtn" title="New SFTP Connection">
|
|
35
|
+
<i class="fas fa-folder-open"></i>
|
|
36
|
+
<span class="btn-text">SFTP</span>
|
|
37
|
+
</button>
|
|
38
|
+
|
|
39
|
+
<!-- Desktop-only controls -->
|
|
40
|
+
<div class="desktop-only">
|
|
41
|
+
<button class="btn btn-icon theme-toggle" id="themeToggle" title="Toggle Theme">
|
|
42
|
+
<i class="fas fa-lightbulb"></i>
|
|
43
|
+
</button>
|
|
44
|
+
<div class="accent-selector" id="accentSelector">
|
|
45
|
+
<button class="btn btn-icon accent-btn" title="Change Accent Color">
|
|
46
|
+
<span class="accent-preview"></span>
|
|
47
|
+
</button>
|
|
48
|
+
<div class="accent-dropdown">
|
|
49
|
+
<button class="accent-option" data-accent="fuchsia" title="Fuchsia">
|
|
50
|
+
<span class="accent-color" style="background: #c10059;"></span>
|
|
51
|
+
<span class="accent-label">Fuchsia</span>
|
|
52
|
+
</button>
|
|
53
|
+
<button class="accent-option" data-accent="green" title="Green">
|
|
54
|
+
<span class="accent-color" style="background: #2ea043;"></span>
|
|
55
|
+
<span class="accent-label">Green</span>
|
|
56
|
+
</button>
|
|
57
|
+
<button class="accent-option" data-accent="purple" title="Purple">
|
|
58
|
+
<span class="accent-color" style="background: #a371f2;"></span>
|
|
59
|
+
<span class="accent-label">Purple</span>
|
|
60
|
+
</button>
|
|
61
|
+
<button class="accent-option" data-accent="orange" title="Orange">
|
|
62
|
+
<span class="accent-color" style="background: #d18616;"></span>
|
|
63
|
+
<span class="accent-label">Orange</span>
|
|
64
|
+
</button>
|
|
65
|
+
<button class="accent-option" data-accent="red" title="Red">
|
|
66
|
+
<span class="accent-color" style="background: #da3633;"></span>
|
|
67
|
+
<span class="accent-label">Red</span>
|
|
68
|
+
</button>
|
|
69
|
+
<button class="accent-option" data-accent="cyan" title="Cyan">
|
|
70
|
+
<span class="accent-color" style="background: #1f6feb;"></span>
|
|
71
|
+
<span class="accent-label">Cyan</span>
|
|
72
|
+
</button>
|
|
73
|
+
<button class="accent-option" data-accent="blue" title="Blue">
|
|
74
|
+
<span class="accent-color" style="background: #58a6ff;"></span>
|
|
75
|
+
<span class="accent-label">Blue</span>
|
|
76
|
+
</button>
|
|
77
|
+
<button class="accent-option" data-accent="yellow" title="Yellow">
|
|
78
|
+
<span class="accent-color" style="background: #d29922;"></span>
|
|
79
|
+
<span class="accent-label">Yellow</span>
|
|
80
|
+
</button>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="terminal-color-selector" id="terminalColorSelector">
|
|
84
|
+
<button class="btn btn-icon terminal-color-btn" title="Terminal Colors">
|
|
85
|
+
<i class="fas fa-palette"></i>
|
|
86
|
+
</button>
|
|
87
|
+
<div class="terminal-color-dropdown">
|
|
88
|
+
<div class="terminal-color-header">
|
|
89
|
+
<span>Terminal Colors</span>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="terminal-color-option">
|
|
92
|
+
<label class="toggle-label">
|
|
93
|
+
<span>Override Colors</span>
|
|
94
|
+
<input type="checkbox" id="terminalColorOverride" class="toggle-checkbox">
|
|
95
|
+
<span class="toggle-slider"></span>
|
|
96
|
+
</label>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="terminal-color-options" id="terminalColorOptions">
|
|
99
|
+
<div class="terminal-color-option">
|
|
100
|
+
<label for="terminalBgColor">Background</label>
|
|
101
|
+
<input type="color" id="terminalBgColor" class="color-input" value="#0d1117">
|
|
102
|
+
</div>
|
|
103
|
+
<div class="terminal-color-option">
|
|
104
|
+
<label for="terminalFgColor">Foreground</label>
|
|
105
|
+
<input type="color" id="terminalFgColor" class="color-input" value="#e6edf3">
|
|
106
|
+
</div>
|
|
107
|
+
<div class="terminal-color-option">
|
|
108
|
+
<label for="terminalSelectionColor">Selection</label>
|
|
109
|
+
<input type="color" id="terminalSelectionColor" class="color-input" value="#264f78">
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="layout-selector desktop-only" id="layoutSelector">
|
|
115
|
+
<button class="btn btn-icon layout-btn" title="Change Layout">
|
|
116
|
+
<i data-lucide="layout-dashboard"></i>
|
|
117
|
+
</button>
|
|
118
|
+
<div class="layout-dropdown" id="layoutDropdown">
|
|
119
|
+
<!-- Layout options will be populated dynamically -->
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
<button class="btn btn-icon" id="settingsBtn" title="Settings">
|
|
123
|
+
<i class="fas fa-cog"></i>
|
|
124
|
+
</button>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<!-- Mobile overflow menu -->
|
|
128
|
+
<div class="mobile-overflow-menu" id="mobileOverflowMenu">
|
|
129
|
+
<button class="btn btn-icon overflow-toggle" id="overflowToggle" title="More Options">
|
|
130
|
+
<i class="fas fa-ellipsis-v"></i>
|
|
131
|
+
</button>
|
|
132
|
+
<div class="overflow-dropdown" id="overflowDropdown">
|
|
133
|
+
<button class="overflow-option" id="mobileThemeToggle">
|
|
134
|
+
<i class="fas fa-lightbulb"></i>
|
|
135
|
+
<span id="mobileThemeToggleText">Toggle Dark</span>
|
|
136
|
+
</button>
|
|
137
|
+
<div class="overflow-submenu" id="mobileAccentSubmenu">
|
|
138
|
+
<button class="overflow-option submenu-toggle">
|
|
139
|
+
<span class="accent-preview"></span>
|
|
140
|
+
<span>Accent Color</span>
|
|
141
|
+
<i class="fas fa-chevron-right submenu-arrow"></i>
|
|
142
|
+
</button>
|
|
143
|
+
<div class="submenu-content accent-submenu">
|
|
144
|
+
<button class="accent-option" data-accent="fuchsia">
|
|
145
|
+
<span class="accent-color" style="background: #c10059;"></span>
|
|
146
|
+
<span class="accent-label">Fuchsia</span>
|
|
147
|
+
</button>
|
|
148
|
+
<button class="accent-option" data-accent="green">
|
|
149
|
+
<span class="accent-color" style="background: #2ea043;"></span>
|
|
150
|
+
<span class="accent-label">Green</span>
|
|
151
|
+
</button>
|
|
152
|
+
<button class="accent-option" data-accent="purple">
|
|
153
|
+
<span class="accent-color" style="background: #a371f2;"></span>
|
|
154
|
+
<span class="accent-label">Purple</span>
|
|
155
|
+
</button>
|
|
156
|
+
<button class="accent-option" data-accent="orange">
|
|
157
|
+
<span class="accent-color" style="background: #d18616;"></span>
|
|
158
|
+
<span class="accent-label">Orange</span>
|
|
159
|
+
</button>
|
|
160
|
+
<button class="accent-option" data-accent="red">
|
|
161
|
+
<span class="accent-color" style="background: #da3633;"></span>
|
|
162
|
+
<span class="accent-label">Red</span>
|
|
163
|
+
</button>
|
|
164
|
+
<button class="accent-option" data-accent="cyan">
|
|
165
|
+
<span class="accent-color" style="background: #1f6feb;"></span>
|
|
166
|
+
<span class="accent-label">Cyan</span>
|
|
167
|
+
</button>
|
|
168
|
+
<button class="accent-option" data-accent="blue">
|
|
169
|
+
<span class="accent-color" style="background: #58a6ff;"></span>
|
|
170
|
+
<span class="accent-label">Blue</span>
|
|
171
|
+
</button>
|
|
172
|
+
<button class="accent-option" data-accent="yellow">
|
|
173
|
+
<span class="accent-color" style="background: #d29922;"></span>
|
|
174
|
+
<span class="accent-label">Yellow</span>
|
|
175
|
+
</button>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<div class="overflow-submenu" id="mobileTerminalColorSubmenu">
|
|
179
|
+
<button class="overflow-option submenu-toggle">
|
|
180
|
+
<i class="fas fa-palette"></i>
|
|
181
|
+
<span>Terminal Colors</span>
|
|
182
|
+
<i class="fas fa-chevron-right submenu-arrow"></i>
|
|
183
|
+
</button>
|
|
184
|
+
<div class="submenu-content terminal-color-submenu">
|
|
185
|
+
<div class="terminal-color-option">
|
|
186
|
+
<label class="toggle-label">
|
|
187
|
+
<span>Override Colors</span>
|
|
188
|
+
<input type="checkbox" id="mobileTerminalColorOverride" class="toggle-checkbox">
|
|
189
|
+
<span class="toggle-slider"></span>
|
|
190
|
+
</label>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="terminal-color-options" id="mobileTerminalColorOptions">
|
|
193
|
+
<div class="terminal-color-option">
|
|
194
|
+
<label for="mobileTerminalBgColor">Background</label>
|
|
195
|
+
<input type="color" id="mobileTerminalBgColor" class="color-input" value="#0d1117">
|
|
196
|
+
</div>
|
|
197
|
+
<div class="terminal-color-option">
|
|
198
|
+
<label for="mobileTerminalFgColor">Foreground</label>
|
|
199
|
+
<input type="color" id="mobileTerminalFgColor" class="color-input" value="#e6edf3">
|
|
200
|
+
</div>
|
|
201
|
+
<div class="terminal-color-option">
|
|
202
|
+
<label for="mobileTerminalSelectionColor">Selection</label>
|
|
203
|
+
<input type="color" id="mobileTerminalSelectionColor" class="color-input" value="#264f78">
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
<button class="overflow-option" id="mobileSettingsBtn">
|
|
209
|
+
<i class="fas fa-cog"></i>
|
|
210
|
+
<span>Settings</span>
|
|
211
|
+
</button>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</header>
|
|
216
|
+
|
|
217
|
+
<!-- Main Content -->
|
|
218
|
+
<div class="main-content">
|
|
219
|
+
<!-- Sidebar -->
|
|
220
|
+
<aside class="sidebar" id="sidebar">
|
|
221
|
+
<div class="sidebar-header">
|
|
222
|
+
<h2><i class="fas fa-bookmark"></i> <span class="sidebar-title">Bookmarks</span></h2>
|
|
223
|
+
<div class="sidebar-header-actions">
|
|
224
|
+
<button class="btn btn-sm" id="addBookmarkBtn" title="Add Bookmark">
|
|
225
|
+
<i class="fas fa-plus"></i>
|
|
226
|
+
</button>
|
|
227
|
+
<button class="btn btn-sm" id="addFolderBtn" title="Add Folder">
|
|
228
|
+
<i class="fas fa-folder-plus"></i>
|
|
229
|
+
</button>
|
|
230
|
+
<button class="btn btn-sm sidebar-toggle desktop-only" id="sidebarToggle" title="Collapse Sidebar">
|
|
231
|
+
<i class="fas fa-chevron-left"></i>
|
|
232
|
+
</button>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
<div class="bookmarks-list" id="bookmarksList">
|
|
236
|
+
<!-- Bookmarks will be populated here -->
|
|
237
|
+
</div>
|
|
238
|
+
<div class="sidebar-footer">
|
|
239
|
+
<div class="version-info">
|
|
240
|
+
<span class="version-label">Version: </span>
|
|
241
|
+
<span class="version-number" id="versionNumber">Loading...</span>
|
|
242
|
+
</div>
|
|
243
|
+
<div class="update-info" id="updateInfo" style="display: none;">
|
|
244
|
+
<span class="check-updates" id="checkUpdates">Check Updates</span>
|
|
245
|
+
<button class="btn btn-sm btn-update" id="updateBtn" style="display: none;">
|
|
246
|
+
<i class="fas fa-download"></i> Update Now!
|
|
247
|
+
</button>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
</aside>
|
|
251
|
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
252
|
+
|
|
253
|
+
<!-- Terminal Area -->
|
|
254
|
+
<main class="terminal-area">
|
|
255
|
+
<!-- Layout Container -->
|
|
256
|
+
<div class="layout-container" id="layoutContainer">
|
|
257
|
+
<!-- Single Panel (default) -->
|
|
258
|
+
<div class="layout-panel" id="panel-0" data-panel-id="0">
|
|
259
|
+
<!-- Tabs -->
|
|
260
|
+
<div class="tabs-container">
|
|
261
|
+
<!-- Desktop tabs -->
|
|
262
|
+
<div class="tabs" id="tabs">
|
|
263
|
+
<!-- Tabs will be added here -->
|
|
264
|
+
</div>
|
|
265
|
+
<!-- Scroll arrows for desktop -->
|
|
266
|
+
<div class="tabs-scroll-arrows" id="tabsScrollArrows">
|
|
267
|
+
<button class="tabs-scroll-arrow" id="scrollLeftBtn" title="Scroll Left">
|
|
268
|
+
<i class="fas fa-chevron-left"></i>
|
|
269
|
+
</button>
|
|
270
|
+
<button class="tabs-scroll-arrow" id="scrollRightBtn" title="Scroll Right">
|
|
271
|
+
<i class="fas fa-chevron-right"></i>
|
|
272
|
+
</button>
|
|
273
|
+
</div>
|
|
274
|
+
<!-- Mobile tabs dropdown -->
|
|
275
|
+
<div class="mobile-tabs-dropdown" id="mobileTabsDropdown">
|
|
276
|
+
<button class="mobile-tabs-toggle" id="mobileTabsToggle">
|
|
277
|
+
<i class="fas fa-terminal tab-icon-active"></i>
|
|
278
|
+
<span class="mobile-tabs-label" id="mobileTabsLabel">No Active Tabs</span>
|
|
279
|
+
<i class="fas fa-chevron-down dropdown-arrow"></i>
|
|
280
|
+
</button>
|
|
281
|
+
<div class="mobile-tabs-menu" id="mobileTabsMenu">
|
|
282
|
+
<!-- Mobile tab options will be added here dynamically -->
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
<div class="tabs-actions">
|
|
286
|
+
<button class="btn btn-sm" id="decreaseFontBtn" title="Decrease Font Size">
|
|
287
|
+
<i class="fas fa-minus"></i>
|
|
288
|
+
</button>
|
|
289
|
+
<button class="btn btn-sm" id="increaseFontBtn" title="Increase Font Size">
|
|
290
|
+
<i class="fas fa-plus"></i>
|
|
291
|
+
</button>
|
|
292
|
+
<button class="btn btn-sm" id="specialKeysBtn" title="Special Keys">
|
|
293
|
+
<i class="fas fa-keyboard"></i>
|
|
294
|
+
</button>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<!-- Terminal Container -->
|
|
299
|
+
<div class="terminals-container" id="terminalsContainer">
|
|
300
|
+
<div class="empty-state" id="emptyState">
|
|
301
|
+
<i class="fas fa-terminal"></i>
|
|
302
|
+
<h3>No Active Sessions</h3>
|
|
303
|
+
<p>Connect to a server using SSH or SFTP</p>
|
|
304
|
+
<div class="empty-actions">
|
|
305
|
+
<button class="btn btn-primary" id="quickSshBtn">
|
|
306
|
+
<i class="fas fa-plug"></i> Quick SSH
|
|
307
|
+
</button>
|
|
308
|
+
<button class="btn btn-primary" id="quickSftpBtn">
|
|
309
|
+
<i class="fas fa-folder-open"></i> Quick SFTP
|
|
310
|
+
</button>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
</main>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
|
|
320
|
+
<!-- Connection Modal -->
|
|
321
|
+
<div class="modal" id="connectionModal">
|
|
322
|
+
<div class="modal-content">
|
|
323
|
+
<div class="modal-header">
|
|
324
|
+
<h2 id="connectionModalTitle">New Connection</h2>
|
|
325
|
+
<button class="modal-close" id="closeConnectionModal">
|
|
326
|
+
<i class="fas fa-times"></i>
|
|
327
|
+
</button>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="modal-body">
|
|
330
|
+
<form id="connectionForm">
|
|
331
|
+
<div class="form-group">
|
|
332
|
+
<label for="connName">Name (optional)</label>
|
|
333
|
+
<input type="text" id="connName" placeholder="My Server">
|
|
334
|
+
</div>
|
|
335
|
+
<div class="form-row">
|
|
336
|
+
<div class="form-group flex-3">
|
|
337
|
+
<label for="connHost">Host *</label>
|
|
338
|
+
<input type="text" id="connHost" required placeholder="hostname or IP">
|
|
339
|
+
</div>
|
|
340
|
+
<div class="form-group flex-1">
|
|
341
|
+
<label for="connPort">Port</label>
|
|
342
|
+
<input type="number" id="connPort" value="22" min="1" max="65535">
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
<div class="form-group">
|
|
346
|
+
<label for="connUsername">Username *</label>
|
|
347
|
+
<input type="text" id="connUsername" required placeholder="username">
|
|
348
|
+
</div>
|
|
349
|
+
<div class="form-group">
|
|
350
|
+
<label for="connPassword">Password</label>
|
|
351
|
+
<div class="password-input">
|
|
352
|
+
<input type="password" id="connPassword" placeholder="password">
|
|
353
|
+
<button type="button" class="password-toggle" id="togglePassword">
|
|
354
|
+
<i class="fas fa-eye"></i>
|
|
355
|
+
</button>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="form-group">
|
|
359
|
+
<label for="connPrivateKey">Private Key (optional)</label>
|
|
360
|
+
<textarea id="connPrivateKey" rows="4" placeholder="Paste your private key here..."></textarea>
|
|
361
|
+
</div>
|
|
362
|
+
<div class="form-group">
|
|
363
|
+
<label for="connPassphrase">Key Passphrase (optional)</label>
|
|
364
|
+
<input type="password" id="connPassphrase" placeholder="passphrase">
|
|
365
|
+
</div>
|
|
366
|
+
<div class="form-group">
|
|
367
|
+
<label class="checkbox-label">
|
|
368
|
+
<input type="checkbox" id="saveBookmark">
|
|
369
|
+
<span class="checkbox-custom"></span>
|
|
370
|
+
<span>Save as bookmark</span>
|
|
371
|
+
</label>
|
|
372
|
+
</div>
|
|
373
|
+
<input type="hidden" id="connectionType" value="ssh">
|
|
374
|
+
</form>
|
|
375
|
+
</div>
|
|
376
|
+
<div class="modal-footer">
|
|
377
|
+
<button class="btn" id="cancelConnection">Cancel</button>
|
|
378
|
+
<button class="btn btn-primary" id="connectBtn">
|
|
379
|
+
<i class="fas fa-plug"></i> Connect
|
|
380
|
+
</button>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
<!-- Bookmark Modal -->
|
|
386
|
+
<div class="modal" id="bookmarkModal">
|
|
387
|
+
<div class="modal-content">
|
|
388
|
+
<div class="modal-header">
|
|
389
|
+
<h2 id="bookmarkModalTitle">Add Bookmark</h2>
|
|
390
|
+
<button class="modal-close" id="closeBookmarkModal">
|
|
391
|
+
<i class="fas fa-times"></i>
|
|
392
|
+
</button>
|
|
393
|
+
</div>
|
|
394
|
+
<div class="modal-body">
|
|
395
|
+
<form id="bookmarkForm">
|
|
396
|
+
<input type="hidden" id="bookmarkId">
|
|
397
|
+
<div class="form-group">
|
|
398
|
+
<label for="bookmarkType">Type</label>
|
|
399
|
+
<select id="bookmarkType">
|
|
400
|
+
<option value="ssh">SSH</option>
|
|
401
|
+
<option value="sftp">SFTP</option>
|
|
402
|
+
<option value="url">URL</option>
|
|
403
|
+
</select>
|
|
404
|
+
</div>
|
|
405
|
+
<div class="form-group">
|
|
406
|
+
<label for="bookmarkName">Name *</label>
|
|
407
|
+
<input type="text" id="bookmarkName" required placeholder="My Server">
|
|
408
|
+
</div>
|
|
409
|
+
<div class="form-group" id="bookmarkUrlGroup" style="display: none;">
|
|
410
|
+
<label for="bookmarkUrl">URL *</label>
|
|
411
|
+
<input type="url" id="bookmarkUrl" class="themed-input" placeholder="https://example.com">
|
|
412
|
+
</div>
|
|
413
|
+
<div id="sshFields">
|
|
414
|
+
<div class="form-row">
|
|
415
|
+
<div class="form-group flex-3">
|
|
416
|
+
<label for="bookmarkHost">Host *</label>
|
|
417
|
+
<input type="text" id="bookmarkHost" placeholder="hostname or IP">
|
|
418
|
+
</div>
|
|
419
|
+
<div class="form-group flex-1">
|
|
420
|
+
<label for="bookmarkPort">Port</label>
|
|
421
|
+
<input type="number" id="bookmarkPort" value="22" min="1" max="65535">
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
<div class="form-group">
|
|
425
|
+
<label for="bookmarkUsername">Username *</label>
|
|
426
|
+
<input type="text" id="bookmarkUsername" placeholder="username">
|
|
427
|
+
</div>
|
|
428
|
+
<div class="form-group">
|
|
429
|
+
<label for="bookmarkPassword">Password</label>
|
|
430
|
+
<div class="password-input">
|
|
431
|
+
<input type="password" id="bookmarkPassword" placeholder="password (optional)">
|
|
432
|
+
<button type="button" class="password-toggle" id="toggleBookmarkPassword">
|
|
433
|
+
<i class="fas fa-eye"></i>
|
|
434
|
+
</button>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
<div class="form-group">
|
|
438
|
+
<label for="bookmarkPrivateKey">Private Key (optional)</label>
|
|
439
|
+
<textarea id="bookmarkPrivateKey" rows="4" placeholder="Paste your private key here..."></textarea>
|
|
440
|
+
</div>
|
|
441
|
+
<div class="form-group">
|
|
442
|
+
<label for="bookmarkPassphrase">Key Passphrase (optional)</label>
|
|
443
|
+
<input type="password" id="bookmarkPassphrase" placeholder="passphrase">
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
<div class="form-group">
|
|
447
|
+
<label for="bookmarkFolder">Folder</label>
|
|
448
|
+
<select id="bookmarkFolder">
|
|
449
|
+
<option value="">No Folder</option>
|
|
450
|
+
<!-- Folders will be populated dynamically -->
|
|
451
|
+
</select>
|
|
452
|
+
</div>
|
|
453
|
+
</form>
|
|
454
|
+
</div>
|
|
455
|
+
<div class="modal-footer">
|
|
456
|
+
<button class="btn" id="cancelBookmark">Cancel</button>
|
|
457
|
+
<button class="btn btn-primary" id="saveBookmarkBtn">
|
|
458
|
+
<i class="fas fa-save"></i> Save
|
|
459
|
+
</button>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
|
|
464
|
+
<!-- Folder Modal -->
|
|
465
|
+
<div class="modal" id="folderModal">
|
|
466
|
+
<div class="modal-content modal-sm">
|
|
467
|
+
<div class="modal-header">
|
|
468
|
+
<h2 id="folderModalTitle">Add Folder</h2>
|
|
469
|
+
<button class="modal-close" id="closeFolderModal">
|
|
470
|
+
<i class="fas fa-times"></i>
|
|
471
|
+
</button>
|
|
472
|
+
</div>
|
|
473
|
+
<div class="modal-body">
|
|
474
|
+
<form id="folderForm">
|
|
475
|
+
<input type="hidden" id="folderId">
|
|
476
|
+
<div class="form-group">
|
|
477
|
+
<label for="folderName">Folder Name *</label>
|
|
478
|
+
<input type="text" id="folderName" required placeholder="My Folder">
|
|
479
|
+
</div>
|
|
480
|
+
<div class="form-group">
|
|
481
|
+
<label>Icon</label>
|
|
482
|
+
<div class="icon-selector" id="folderIconSelector">
|
|
483
|
+
<div class="icon-option selected" data-icon="folder" title="Folder">
|
|
484
|
+
<i class="fas fa-folder"></i>
|
|
485
|
+
</div>
|
|
486
|
+
<div class="icon-option" data-icon="server" title="Server">
|
|
487
|
+
<i class="fas fa-server"></i>
|
|
488
|
+
</div>
|
|
489
|
+
<div class="icon-option" data-icon="cloud" title="Cloud">
|
|
490
|
+
<i class="fas fa-cloud"></i>
|
|
491
|
+
</div>
|
|
492
|
+
<div class="icon-option" data-icon="database" title="Database">
|
|
493
|
+
<i class="fas fa-database"></i>
|
|
494
|
+
</div>
|
|
495
|
+
<div class="icon-option" data-icon="code" title="Code">
|
|
496
|
+
<i class="fas fa-code"></i>
|
|
497
|
+
</div>
|
|
498
|
+
<div class="icon-option" data-icon="cog" title="Settings">
|
|
499
|
+
<i class="fas fa-cog"></i>
|
|
500
|
+
</div>
|
|
501
|
+
<div class="icon-option" data-icon="briefcase" title="Work">
|
|
502
|
+
<i class="fas fa-briefcase"></i>
|
|
503
|
+
</div>
|
|
504
|
+
<div class="icon-option" data-icon="home" title="Home">
|
|
505
|
+
<i class="fas fa-home"></i>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
<input type="hidden" id="folderIcon" value="folder">
|
|
509
|
+
</div>
|
|
510
|
+
</form>
|
|
511
|
+
</div>
|
|
512
|
+
<div class="modal-footer">
|
|
513
|
+
<button class="btn" id="cancelFolder">Cancel</button>
|
|
514
|
+
<button class="btn btn-primary" id="saveFolderBtn">
|
|
515
|
+
<i class="fas fa-save"></i> Save
|
|
516
|
+
</button>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
|
|
521
|
+
<!-- Special Keys Modal -->
|
|
522
|
+
<div class="modal" id="specialKeysModal">
|
|
523
|
+
<div class="modal-content modal-sm">
|
|
524
|
+
<div class="modal-header">
|
|
525
|
+
<h2><i class="fas fa-keyboard"></i> Special Keys</h2>
|
|
526
|
+
<button class="modal-close" id="closeSpecialKeysModal">
|
|
527
|
+
<i class="fas fa-times"></i>
|
|
528
|
+
</button>
|
|
529
|
+
</div>
|
|
530
|
+
<div class="modal-body">
|
|
531
|
+
<div class="special-keys-grid">
|
|
532
|
+
<button class="key-btn" data-key="ctrl+c" title="Interrupt">
|
|
533
|
+
<span class="key-combo">Ctrl+C</span>
|
|
534
|
+
<span class="key-desc">Interrupt</span>
|
|
535
|
+
</button>
|
|
536
|
+
<button class="key-btn" data-key="ctrl+d" title="EOF">
|
|
537
|
+
<span class="key-combo">Ctrl+D</span>
|
|
538
|
+
<span class="key-desc">EOF</span>
|
|
539
|
+
</button>
|
|
540
|
+
<button class="key-btn" data-key="ctrl+z" title="Suspend">
|
|
541
|
+
<span class="key-combo">Ctrl+Z</span>
|
|
542
|
+
<span class="key-desc">Suspend</span>
|
|
543
|
+
</button>
|
|
544
|
+
<button class="key-btn" data-key="ctrl+a" title="Beginning of line">
|
|
545
|
+
<span class="key-combo">Ctrl+A</span>
|
|
546
|
+
<span class="key-desc">Home</span>
|
|
547
|
+
</button>
|
|
548
|
+
<button class="key-btn" data-key="ctrl+e" title="End of line">
|
|
549
|
+
<span class="key-combo">Ctrl+E</span>
|
|
550
|
+
<span class="key-desc">End</span>
|
|
551
|
+
</button>
|
|
552
|
+
<button class="key-btn" data-key="ctrl+l" title="Clear screen">
|
|
553
|
+
<span class="key-combo">Ctrl+L</span>
|
|
554
|
+
<span class="key-desc">Clear</span>
|
|
555
|
+
</button>
|
|
556
|
+
<button class="key-btn" data-key="ctrl+r" title="Reverse search">
|
|
557
|
+
<span class="key-combo">Ctrl+R</span>
|
|
558
|
+
<span class="key-desc">Search</span>
|
|
559
|
+
</button>
|
|
560
|
+
<button class="key-btn" data-key="ctrl+u" title="Clear line">
|
|
561
|
+
<span class="key-combo">Ctrl+U</span>
|
|
562
|
+
<span class="key-desc">Clear Line</span>
|
|
563
|
+
</button>
|
|
564
|
+
<button class="key-btn" data-key="ctrl+k" title="Clear to end">
|
|
565
|
+
<span class="key-combo">Ctrl+K</span>
|
|
566
|
+
<span class="key-desc">Clear End</span>
|
|
567
|
+
</button>
|
|
568
|
+
<button class="key-btn" data-key="ctrl+w" title="Delete word">
|
|
569
|
+
<span class="key-combo">Ctrl+W</span>
|
|
570
|
+
<span class="key-desc">Del Word</span>
|
|
571
|
+
</button>
|
|
572
|
+
<button class="key-btn" data-key="tab" title="Tab">
|
|
573
|
+
<span class="key-combo">Tab</span>
|
|
574
|
+
<span class="key-desc">Complete</span>
|
|
575
|
+
</button>
|
|
576
|
+
<button class="key-btn" data-key="escape" title="Escape">
|
|
577
|
+
<span class="key-combo">Esc</span>
|
|
578
|
+
<span class="key-desc">Escape</span>
|
|
579
|
+
</button>
|
|
580
|
+
<button class="key-btn" data-key="f1" title="F1">
|
|
581
|
+
<span class="key-combo">F1</span>
|
|
582
|
+
</button>
|
|
583
|
+
<button class="key-btn" data-key="f2" title="F2">
|
|
584
|
+
<span class="key-combo">F2</span>
|
|
585
|
+
</button>
|
|
586
|
+
<button class="key-btn" data-key="f3" title="F3">
|
|
587
|
+
<span class="key-combo">F3</span>
|
|
588
|
+
</button>
|
|
589
|
+
<button class="key-btn" data-key="f4" title="F4">
|
|
590
|
+
<span class="key-combo">F4</span>
|
|
591
|
+
</button>
|
|
592
|
+
<button class="key-btn" data-key="f5" title="F5">
|
|
593
|
+
<span class="key-combo">F5</span>
|
|
594
|
+
</button>
|
|
595
|
+
<button class="key-btn" data-key="f6" title="F6">
|
|
596
|
+
<span class="key-combo">F6</span>
|
|
597
|
+
</button>
|
|
598
|
+
<button class="key-btn" data-key="f7" title="F7">
|
|
599
|
+
<span class="key-combo">F7</span>
|
|
600
|
+
</button>
|
|
601
|
+
<button class="key-btn" data-key="f8" title="F8">
|
|
602
|
+
<span class="key-combo">F8</span>
|
|
603
|
+
</button>
|
|
604
|
+
<button class="key-btn" data-key="f9" title="F9">
|
|
605
|
+
<span class="key-combo">F9</span>
|
|
606
|
+
</button>
|
|
607
|
+
<button class="key-btn" data-key="f10" title="F10">
|
|
608
|
+
<span class="key-combo">F10</span>
|
|
609
|
+
</button>
|
|
610
|
+
<button class="key-btn" data-key="f11" title="F11">
|
|
611
|
+
<span class="key-combo">F11</span>
|
|
612
|
+
</button>
|
|
613
|
+
<button class="key-btn" data-key="f12" title="F12">
|
|
614
|
+
<span class="key-combo">F12</span>
|
|
615
|
+
</button>
|
|
616
|
+
<button class="key-btn" data-key="arrow_up" title="Up Arrow">
|
|
617
|
+
<span class="key-combo">↑</span>
|
|
618
|
+
</button>
|
|
619
|
+
<button class="key-btn" data-key="arrow_down" title="Down Arrow">
|
|
620
|
+
<span class="key-combo">↓</span>
|
|
621
|
+
</button>
|
|
622
|
+
<button class="key-btn" data-key="arrow_left" title="Left Arrow">
|
|
623
|
+
<span class="key-combo">←</span>
|
|
624
|
+
</button>
|
|
625
|
+
<button class="key-btn" data-key="arrow_right" title="Right Arrow">
|
|
626
|
+
<span class="key-combo">→</span>
|
|
627
|
+
</button>
|
|
628
|
+
<button class="key-btn" data-key="home" title="Home">
|
|
629
|
+
<span class="key-combo">Home</span>
|
|
630
|
+
</button>
|
|
631
|
+
<button class="key-btn" data-key="end" title="End">
|
|
632
|
+
<span class="key-combo">End</span>
|
|
633
|
+
</button>
|
|
634
|
+
<button class="key-btn" data-key="pageup" title="Page Up">
|
|
635
|
+
<span class="key-combo">PgUp</span>
|
|
636
|
+
</button>
|
|
637
|
+
<button class="key-btn" data-key="pagedown" title="Page Down">
|
|
638
|
+
<span class="key-combo">PgDn</span>
|
|
639
|
+
</button>
|
|
640
|
+
<button class="key-btn" data-key="insert" title="Insert">
|
|
641
|
+
<span class="key-combo">Ins</span>
|
|
642
|
+
</button>
|
|
643
|
+
<button class="key-btn" data-key="delete" title="Delete">
|
|
644
|
+
<span class="key-combo">Del</span>
|
|
645
|
+
</button>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
|
|
651
|
+
<!-- SFTP Browser Modal -->
|
|
652
|
+
<div class="modal" id="sftpModal">
|
|
653
|
+
<div class="modal-content modal-lg">
|
|
654
|
+
<div class="modal-header">
|
|
655
|
+
<h2><i class="fas fa-folder-open"></i> <span id="sftpTitle">SFTP Browser</span></h2>
|
|
656
|
+
<button class="modal-close" id="closeSftpModal">
|
|
657
|
+
<i class="fas fa-times"></i>
|
|
658
|
+
</button>
|
|
659
|
+
</div>
|
|
660
|
+
<div class="modal-body">
|
|
661
|
+
<div class="sftp-toolbar">
|
|
662
|
+
<div class="sftp-path">
|
|
663
|
+
<input type="text" id="sftpPath" placeholder="/path/to/directory">
|
|
664
|
+
<button class="btn btn-sm" id="sftpGoBtn">
|
|
665
|
+
<i class="fas fa-arrow-right"></i>
|
|
666
|
+
</button>
|
|
667
|
+
</div>
|
|
668
|
+
<div class="sftp-actions">
|
|
669
|
+
<button class="btn btn-sm" id="sftpRefreshBtn" title="Refresh">
|
|
670
|
+
<i class="fas fa-sync-alt"></i>
|
|
671
|
+
</button>
|
|
672
|
+
<button class="btn btn-sm" id="sftpMkdirBtn" title="New Folder">
|
|
673
|
+
<i class="fas fa-folder-plus"></i>
|
|
674
|
+
</button>
|
|
675
|
+
<button class="btn btn-sm" id="sftpUploadBtn" title="Upload">
|
|
676
|
+
<i class="fas fa-upload"></i>
|
|
677
|
+
</button>
|
|
678
|
+
</div>
|
|
679
|
+
</div>
|
|
680
|
+
<div class="sftp-file-list" id="sftpFileList">
|
|
681
|
+
<!-- Files will be listed here -->
|
|
682
|
+
</div>
|
|
683
|
+
</div>
|
|
684
|
+
</div>
|
|
685
|
+
</div>
|
|
686
|
+
|
|
687
|
+
<!-- Settings Modal -->
|
|
688
|
+
<div class="modal" id="settingsModal">
|
|
689
|
+
<div class="modal-content">
|
|
690
|
+
<div class="modal-header">
|
|
691
|
+
<h2><i class="fas fa-cog"></i> Settings</h2>
|
|
692
|
+
<button class="modal-close" id="closeSettingsModal">
|
|
693
|
+
<i class="fas fa-times"></i>
|
|
694
|
+
</button>
|
|
695
|
+
</div>
|
|
696
|
+
<div class="modal-body">
|
|
697
|
+
<!-- Sticky Sessions Setting -->
|
|
698
|
+
<div class="setting-group">
|
|
699
|
+
<div class="setting-item">
|
|
700
|
+
<label class="setting-label">
|
|
701
|
+
<i class="fas fa-link"></i> Sticky Sessions
|
|
702
|
+
</label>
|
|
703
|
+
<div class="setting-description">
|
|
704
|
+
When enabled, sessions and tabs are synchronized across browser windows. When disabled, each browser tab works independently with its own session.
|
|
705
|
+
</div>
|
|
706
|
+
<div class="setting-control">
|
|
707
|
+
<label class="toggle-switch">
|
|
708
|
+
<input type="checkbox" id="stickyToggle" checked>
|
|
709
|
+
<span class="toggle-slider"></span>
|
|
710
|
+
</label>
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
|
|
714
|
+
<div class="setting-item">
|
|
715
|
+
<label class="setting-label">
|
|
716
|
+
<i class="fas fa-hand-paper"></i> Take Control by Default
|
|
717
|
+
</label>
|
|
718
|
+
<div class="setting-description">
|
|
719
|
+
When enabled, automatically take control of existing sessions when you open the app. When disabled, you'll need to click "Take Control" to interact with sessions.
|
|
720
|
+
</div>
|
|
721
|
+
<div class="setting-control">
|
|
722
|
+
<label class="toggle-switch">
|
|
723
|
+
<input type="checkbox" id="takeControlDefaultToggle" checked>
|
|
724
|
+
<span class="toggle-slider"></span>
|
|
725
|
+
</label>
|
|
726
|
+
</div>
|
|
727
|
+
</div>
|
|
728
|
+
</div>
|
|
729
|
+
|
|
730
|
+
<!-- SSH Keepalive Settings -->
|
|
731
|
+
<div class="setting-group">
|
|
732
|
+
<div class="setting-item">
|
|
733
|
+
<label class="setting-label">
|
|
734
|
+
<i class="fas fa-heartbeat"></i> SSH Keepalive Interval (ms)
|
|
735
|
+
</label>
|
|
736
|
+
<div class="setting-description">
|
|
737
|
+
How often to send keepalive packets to maintain SSH connections. Default: 10000ms (10 seconds).
|
|
738
|
+
</div>
|
|
739
|
+
<div class="setting-control">
|
|
740
|
+
<input type="number" id="sshKeepaliveInterval" class="setting-input" min="1000" max="60000" step="1000" value="10000">
|
|
741
|
+
</div>
|
|
742
|
+
</div>
|
|
743
|
+
|
|
744
|
+
<div class="setting-item">
|
|
745
|
+
<label class="setting-label">
|
|
746
|
+
<i class="fas fa-exclamation-triangle"></i> SSH Keepalive Count Max
|
|
747
|
+
</label>
|
|
748
|
+
<div class="setting-description">
|
|
749
|
+
Maximum number of missed keepalive responses before disconnecting. Higher values allow longer connection persistence. Default: 1000 (~2.7 hours).
|
|
750
|
+
</div>
|
|
751
|
+
<div class="setting-control">
|
|
752
|
+
<input type="number" id="sshKeepaliveCountMax" class="setting-input" min="1" max="10000" step="1" value="1000">
|
|
753
|
+
</div>
|
|
754
|
+
</div>
|
|
755
|
+
</div>
|
|
756
|
+
|
|
757
|
+
<!-- Mobile Keys Bar Setting -->
|
|
758
|
+
<div class="setting-group">
|
|
759
|
+
<div class="setting-item">
|
|
760
|
+
<label class="setting-label">
|
|
761
|
+
<i class="fas fa-keyboard"></i> Mobile Keys Bar
|
|
762
|
+
</label>
|
|
763
|
+
<div class="setting-description">
|
|
764
|
+
Show a fixed keyboard bar at the bottom on mobile devices with special keys like ESC, Tab, Ctrl, Alt, and arrow keys for easier terminal input.
|
|
765
|
+
</div>
|
|
766
|
+
<div class="setting-control">
|
|
767
|
+
<label class="toggle-switch">
|
|
768
|
+
<input type="checkbox" id="mobileKeysBarToggle" checked>
|
|
769
|
+
<span class="toggle-slider"></span>
|
|
770
|
+
</label>
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
<!-- Manage Sessions -->
|
|
776
|
+
<div class="setting-group">
|
|
777
|
+
<div class="setting-item">
|
|
778
|
+
<label class="setting-label">
|
|
779
|
+
<i class="fas fa-tasks"></i> Active Sessions
|
|
780
|
+
</label>
|
|
781
|
+
<div class="setting-description">
|
|
782
|
+
View and manage active SSH and SFTP sessions on the server.
|
|
783
|
+
</div>
|
|
784
|
+
<div class="setting-control">
|
|
785
|
+
<button class="btn btn-secondary" id="manageSessionsBtn">
|
|
786
|
+
<i class="fas fa-list"></i> Manage Sessions
|
|
787
|
+
</button>
|
|
788
|
+
</div>
|
|
789
|
+
</div>
|
|
790
|
+
</div>
|
|
791
|
+
</div>
|
|
792
|
+
<div class="modal-footer">
|
|
793
|
+
<button class="btn" id="cancelSettings">Cancel</button>
|
|
794
|
+
<button class="btn btn-primary" id="saveSettings">
|
|
795
|
+
<i class="fas fa-save"></i> Save
|
|
796
|
+
</button>
|
|
797
|
+
</div>
|
|
798
|
+
</div>
|
|
799
|
+
</div>
|
|
800
|
+
|
|
801
|
+
<!-- Manage Sessions Modal -->
|
|
802
|
+
<div class="modal" id="manageSessionsModal">
|
|
803
|
+
<div class="modal-content modal-large">
|
|
804
|
+
<div class="modal-header">
|
|
805
|
+
<h2><i class="fas fa-tasks"></i> Manage Active Sessions</h2>
|
|
806
|
+
<button class="modal-close" id="closeManageSessionsModal">
|
|
807
|
+
<i class="fas fa-times"></i>
|
|
808
|
+
</button>
|
|
809
|
+
</div>
|
|
810
|
+
<div class="modal-body">
|
|
811
|
+
<div class="sessions-list" id="sessionsList">
|
|
812
|
+
<!-- Sessions will be populated dynamically -->
|
|
813
|
+
<div class="sessions-loading">
|
|
814
|
+
<i class="fas fa-spinner fa-spin"></i> Loading sessions...
|
|
815
|
+
</div>
|
|
816
|
+
</div>
|
|
817
|
+
</div>
|
|
818
|
+
<div class="modal-footer">
|
|
819
|
+
<button class="btn" id="closeManageSessions">Close</button>
|
|
820
|
+
<button class="btn btn-danger" id="closeAllSessions">
|
|
821
|
+
<i class="fas fa-times-circle"></i> Close All Sessions
|
|
822
|
+
</button>
|
|
823
|
+
</div>
|
|
824
|
+
</div>
|
|
825
|
+
</div>
|
|
826
|
+
|
|
827
|
+
<!-- Mobile Keys Bar -->
|
|
828
|
+
<div class="mobile-keys-bar" id="mobileKeysBar">
|
|
829
|
+
<div class="mobile-keys-row">
|
|
830
|
+
<button class="mobile-key" data-key="esc" title="Escape">ESC</button>
|
|
831
|
+
<button class="mobile-key" data-key="/" title="Slash">/</button>
|
|
832
|
+
<button class="mobile-key" data-key="-" title="Minus">-</button>
|
|
833
|
+
<button class="mobile-key" data-key="home" title="Home">HOME</button>
|
|
834
|
+
<button class="mobile-key mobile-key-arrow mobile-key-up" data-key="up" title="Up">▲</button>
|
|
835
|
+
<button class="mobile-key" data-key="end" title="End">END</button>
|
|
836
|
+
<button class="mobile-key" data-key="pgup" title="Page Up">PGUP</button>
|
|
837
|
+
</div>
|
|
838
|
+
<div class="mobile-keys-row">
|
|
839
|
+
<button class="mobile-key" data-key="tab" title="Tab">⇥</button>
|
|
840
|
+
<button class="mobile-key mobile-key-modifier" data-key="ctrl" title="Control">CTRL</button>
|
|
841
|
+
<button class="mobile-key mobile-key-modifier" data-key="alt" title="Alt">ALT</button>
|
|
842
|
+
<button class="mobile-key mobile-key-arrow mobile-key-left" data-key="left" title="Left">◀</button>
|
|
843
|
+
<button class="mobile-key mobile-key-arrow mobile-key-down" data-key="down" title="Down">▼</button>
|
|
844
|
+
<button class="mobile-key mobile-key-arrow mobile-key-right" data-key="right" title="Right">▶</button>
|
|
845
|
+
<button class="mobile-key" data-key="pgdn" title="Page Down">PGDN</button>
|
|
846
|
+
</div>
|
|
847
|
+
</div>
|
|
848
|
+
|
|
849
|
+
<!-- Toast Container -->
|
|
850
|
+
<div class="toast-container" id="toastContainer"></div>
|
|
851
|
+
|
|
852
|
+
<!-- Update Overlay -->
|
|
853
|
+
<div class="update-overlay" id="updateOverlay">
|
|
854
|
+
<div class="update-overlay-content">
|
|
855
|
+
<div class="update-spinner">
|
|
856
|
+
<i class="fas fa-sync-alt fa-spin"></i>
|
|
857
|
+
</div>
|
|
858
|
+
<h2 class="update-title">Updating SSHIFT</h2>
|
|
859
|
+
<p class="update-message" id="updateMessage">Please wait while the update is being installed...</p>
|
|
860
|
+
<div class="update-progress">
|
|
861
|
+
<div class="update-progress-bar" id="updateProgressBar"></div>
|
|
862
|
+
</div>
|
|
863
|
+
<p class="update-status" id="updateStatus">Checking for new version...</p>
|
|
864
|
+
</div>
|
|
865
|
+
</div>
|
|
866
|
+
|
|
867
|
+
<!-- Scripts -->
|
|
868
|
+
<!-- xterm.js and addons - Local files for offline support -->
|
|
869
|
+
<script src="/libs/xterm/xterm.js"></script>
|
|
870
|
+
<script src="/libs/xterm/xterm-addon-fit.js"></script>
|
|
871
|
+
<script src="/libs/xterm/xterm-addon-web-links.js"></script>
|
|
872
|
+
<script src="/libs/xterm/xterm-addon-search.js"></script>
|
|
873
|
+
<script src="/libs/xterm/xterm-addon-serialize.js"></script>
|
|
874
|
+
|
|
875
|
+
<!-- Normalize addon exports - UMD pattern exports { FitAddon: class } not the class directly -->
|
|
876
|
+
<script>
|
|
877
|
+
// The UMD pattern exports an object with the class as a property
|
|
878
|
+
// e.g., window.FitAddon = { FitAddon: class FitAddon { ... } }
|
|
879
|
+
// We need to extract the actual constructor
|
|
880
|
+
|
|
881
|
+
(function() {
|
|
882
|
+
console.log('[SSHIFT] Normalizing addon exports...');
|
|
883
|
+
console.log('[SSHIFT] Before normalization:');
|
|
884
|
+
console.log('[SSHIFT] Terminal:', typeof window.Terminal);
|
|
885
|
+
console.log('[SSHIFT] FitAddon:', typeof window.FitAddon);
|
|
886
|
+
console.log('[SSHIFT] WebLinksAddon:', typeof window.WebLinksAddon);
|
|
887
|
+
console.log('[SSHIFT] SearchAddon:', typeof window.SearchAddon);
|
|
888
|
+
|
|
889
|
+
// Normalize Terminal - check if it's an object with Terminal property
|
|
890
|
+
if (typeof window.Terminal === 'object' && window.Terminal !== null) {
|
|
891
|
+
if (window.Terminal.Terminal) {
|
|
892
|
+
console.log('[SSHIFT] Terminal is object with .Terminal property, extracting...');
|
|
893
|
+
window.Terminal = window.Terminal.Terminal;
|
|
894
|
+
} else {
|
|
895
|
+
console.log('[SSHIFT] Terminal is object but no .Terminal property found');
|
|
896
|
+
// Check if it's already the Terminal class in a different location
|
|
897
|
+
if (window.Terminal.default) {
|
|
898
|
+
window.Terminal = window.Terminal.default;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
// Normalize FitAddon
|
|
904
|
+
if (typeof window.FitAddon === 'object' && window.FitAddon !== null) {
|
|
905
|
+
if (window.FitAddon.FitAddon) {
|
|
906
|
+
console.log('[SSHIFT] FitAddon is object with .FitAddon property, extracting...');
|
|
907
|
+
window.FitAddon = window.FitAddon.FitAddon;
|
|
908
|
+
} else if (window.FitAddon.default) {
|
|
909
|
+
window.FitAddon = window.FitAddon.default;
|
|
910
|
+
}
|
|
911
|
+
} else if (typeof window.FitAddon === 'undefined') {
|
|
912
|
+
// Try global scope
|
|
913
|
+
if (typeof FitAddon !== 'undefined') {
|
|
914
|
+
if (typeof FitAddon === 'object' && FitAddon !== null) {
|
|
915
|
+
window.FitAddon = FitAddon.FitAddon || FitAddon.default || FitAddon;
|
|
916
|
+
} else if (typeof FitAddon === 'function') {
|
|
917
|
+
window.FitAddon = FitAddon;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
// Normalize WebLinksAddon
|
|
923
|
+
if (typeof window.WebLinksAddon === 'object' && window.WebLinksAddon !== null) {
|
|
924
|
+
if (window.WebLinksAddon.WebLinksAddon) {
|
|
925
|
+
console.log('[SSHIFT] WebLinksAddon is object with .WebLinksAddon property, extracting...');
|
|
926
|
+
window.WebLinksAddon = window.WebLinksAddon.WebLinksAddon;
|
|
927
|
+
} else if (window.WebLinksAddon.default) {
|
|
928
|
+
window.WebLinksAddon = window.WebLinksAddon.default;
|
|
929
|
+
}
|
|
930
|
+
} else if (typeof window.WebLinksAddon === 'undefined') {
|
|
931
|
+
if (typeof WebLinksAddon !== 'undefined') {
|
|
932
|
+
if (typeof WebLinksAddon === 'object' && WebLinksAddon !== null) {
|
|
933
|
+
window.WebLinksAddon = WebLinksAddon.WebLinksAddon || WebLinksAddon.default || WebLinksAddon;
|
|
934
|
+
} else if (typeof WebLinksAddon === 'function') {
|
|
935
|
+
window.WebLinksAddon = WebLinksAddon;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
// Normalize SearchAddon
|
|
941
|
+
if (typeof window.SearchAddon === 'object' && window.SearchAddon !== null) {
|
|
942
|
+
if (window.SearchAddon.SearchAddon) {
|
|
943
|
+
console.log('[SSHIFT] SearchAddon is object with .SearchAddon property, extracting...');
|
|
944
|
+
window.SearchAddon = window.SearchAddon.SearchAddon;
|
|
945
|
+
} else if (window.SearchAddon.default) {
|
|
946
|
+
window.SearchAddon = window.SearchAddon.default;
|
|
947
|
+
}
|
|
948
|
+
} else if (typeof window.SearchAddon === 'undefined') {
|
|
949
|
+
if (typeof SearchAddon !== 'undefined') {
|
|
950
|
+
if (typeof SearchAddon === 'object' && SearchAddon !== null) {
|
|
951
|
+
window.SearchAddon = SearchAddon.SearchAddon || SearchAddon.default || SearchAddon;
|
|
952
|
+
} else if (typeof SearchAddon === 'function') {
|
|
953
|
+
window.SearchAddon = SearchAddon;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// Normalize SerializeAddon
|
|
959
|
+
if (typeof window.SerializeAddon === 'object' && window.SerializeAddon !== null) {
|
|
960
|
+
if (window.SerializeAddon.SerializeAddon) {
|
|
961
|
+
console.log('[SSHIFT] SerializeAddon is object with .SerializeAddon property, extracting...');
|
|
962
|
+
window.SerializeAddon = window.SerializeAddon.SerializeAddon;
|
|
963
|
+
} else if (window.SerializeAddon.default) {
|
|
964
|
+
window.SerializeAddon = window.SerializeAddon.default;
|
|
965
|
+
}
|
|
966
|
+
} else if (typeof window.SerializeAddon === 'undefined') {
|
|
967
|
+
if (typeof SerializeAddon !== 'undefined') {
|
|
968
|
+
if (typeof SerializeAddon === 'object' && SerializeAddon !== null) {
|
|
969
|
+
window.SerializeAddon = SerializeAddon.SerializeAddon || SerializeAddon.default || SerializeAddon;
|
|
970
|
+
} else if (typeof SerializeAddon === 'function') {
|
|
971
|
+
window.SerializeAddon = SerializeAddon;
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
console.log('[SSHIFT] After normalization:');
|
|
977
|
+
console.log('[SSHIFT] Terminal:', typeof window.Terminal);
|
|
978
|
+
console.log('[SSHIFT] FitAddon:', typeof window.FitAddon);
|
|
979
|
+
console.log('[SSHIFT] WebLinksAddon:', typeof window.WebLinksAddon);
|
|
980
|
+
console.log('[SSHIFT] SearchAddon:', typeof window.SearchAddon);
|
|
981
|
+
|
|
982
|
+
// Verify all required libraries are loaded
|
|
983
|
+
if (typeof window.Terminal !== 'function') {
|
|
984
|
+
console.error('[SSHIFT] CRITICAL: Terminal class not loaded! typeof:', typeof window.Terminal);
|
|
985
|
+
if (typeof window.Terminal === 'object') {
|
|
986
|
+
console.error('[SSHIFT] Terminal object keys:', window.Terminal ? Object.keys(window.Terminal) : 'null');
|
|
987
|
+
}
|
|
988
|
+
alert('Failed to load terminal library. Please refresh the page.');
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
if (typeof window.FitAddon !== 'function') {
|
|
993
|
+
console.error('[SSHIFT] CRITICAL: FitAddon class not loaded! typeof:', typeof window.FitAddon);
|
|
994
|
+
if (typeof window.FitAddon === 'object') {
|
|
995
|
+
console.error('[SSHIFT] FitAddon object keys:', window.FitAddon ? Object.keys(window.FitAddon) : 'null');
|
|
996
|
+
}
|
|
997
|
+
alert('Failed to load terminal fit addon. Please refresh the page.');
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
console.log('[SSHIFT] ✓ All required libraries loaded successfully');
|
|
1002
|
+
})();
|
|
1003
|
+
</script>
|
|
1004
|
+
|
|
1005
|
+
<script src="/socket.io/socket.io.js"></script>
|
|
1006
|
+
<script src="/js/app.js"></script>
|
|
1007
|
+
</body>
|
|
1008
|
+
</html>
|