Ditzzy AF commited on
Commit
ca87d12
·
1 Parent(s): d74a91d

feat: Update .gitignore and enhance terminal UI in Dockerfile and views/terminal.ejs

Browse files

- Add node_modules, package-lock.json, and yarn.lock to .gitignore
- Ensure Docker container runs as root
- Improve terminal card styling with rounded corners, shadows, and consistent padding
- Adjust terminal header and connection status positioning for better visual hierarchy

Files changed (3) hide show
  1. .gitignore +4 -1
  2. Dockerfile +4 -1
  3. views/terminal.ejs +42 -20
.gitignore CHANGED
@@ -1,2 +1,5 @@
1
  .env
2
- passgen.js
 
 
 
 
1
  .env
2
+ passgen.js
3
+ node_modules/
4
+ package-lock.json
5
+ yarn.lock
Dockerfile CHANGED
@@ -47,5 +47,8 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
47
  ENV SHELL=/bin/bash
48
  ENV HOME=/root
49
 
50
- # Start aplikasi, gunakan port dari Hugging Face Secret jika ada
 
 
 
51
  CMD ["node", "app.js"]
 
47
  ENV SHELL=/bin/bash
48
  ENV HOME=/root
49
 
50
+ # Pastikan container berjalan sebagai root
51
+ USER root
52
+
53
+ # Start aplikasi
54
  CMD ["node", "app.js"]
views/terminal.ejs CHANGED
@@ -109,10 +109,20 @@
109
  position: relative;
110
  }
111
 
 
 
 
 
 
 
 
 
 
112
  .terminal-header {
113
- background: rgba(39, 39, 42, 0.8);
114
- padding: 12px 20px;
115
  border-bottom: 1px solid #3f3f46;
 
 
116
  font-size: 13px;
117
  font-weight: 500;
118
  display: flex;
@@ -126,8 +136,10 @@
126
 
127
  #terminal {
128
  height: calc(100vh - 60px - 45px);
129
- padding: 16px;
130
  background: #0c0c0c;
 
 
131
  }
132
 
133
  .sidebar {
@@ -341,24 +353,32 @@
341
  flex-direction: column;
342
  }
343
 
 
 
 
 
 
 
 
 
 
344
  .terminal-header {
345
- padding: 8px 16px;
346
- font-size: 12px;
347
- position: relative;
348
- z-index: 100;
349
  }
350
 
351
  #terminal {
352
- flex: 1;
353
- height: auto;
354
- min-height: 200px;
355
  padding: 12px;
356
- margin-bottom: 12px;
357
  }
358
 
359
  .connection-status {
360
- top: 8px;
361
  right: 16px;
 
362
  font-size: 10px;
363
  }
364
 
@@ -542,14 +562,16 @@
542
  </div>
543
 
544
  <div class="terminal-section">
545
- <div class="terminal-header">
546
- <span class="terminal-icon">></span>
547
- Shell Session
548
- </div>
549
- <div id="terminal"></div>
550
- <div class="connection-status">
551
- <div class="connection-dot" id="connection-dot"></div>
552
- <span id="connection-text">Connecting...</span>
 
 
553
  </div>
554
  </div>
555
 
 
109
  position: relative;
110
  }
111
 
112
+ .terminal-card {
113
+ background: #18181b;
114
+ border-radius: 16px;
115
+ box-shadow: 0 4px 24px rgba(0,0,0,0.25);
116
+ border: 1px solid #27272a;
117
+ overflow: hidden;
118
+ margin-bottom: 16px;
119
+ }
120
+
121
  .terminal-header {
122
+ border-radius: 16px 16px 0 0;
 
123
  border-bottom: 1px solid #3f3f46;
124
+ background: rgba(39, 39, 42, 0.9);
125
+ padding: 12px 20px;
126
  font-size: 13px;
127
  font-weight: 500;
128
  display: flex;
 
136
 
137
  #terminal {
138
  height: calc(100vh - 60px - 45px);
139
+ padding: 12px;
140
  background: #0c0c0c;
141
+ border-radius: 0 0 16px 16px;
142
+ min-height: 180px;
143
  }
144
 
145
  .sidebar {
 
353
  flex-direction: column;
354
  }
355
 
356
+ .terminal-card {
357
+ background: #18181b;
358
+ border-radius: 16px;
359
+ box-shadow: 0 4px 24px rgba(0,0,0,0.25);
360
+ border: 1px solid #27272a;
361
+ overflow: hidden;
362
+ margin-bottom: 16px;
363
+ }
364
+
365
  .terminal-header {
366
+ border-radius: 16px 16px 0 0;
367
+ border-bottom: 1px solid #3f3f46;
368
+ background: rgba(39, 39, 42, 0.9);
369
+ padding: 12px 20px;
370
  }
371
 
372
  #terminal {
373
+ border-radius: 0 0 16px 16px;
374
+ background: #0c0c0c;
 
375
  padding: 12px;
376
+ min-height: 180px;
377
  }
378
 
379
  .connection-status {
 
380
  right: 16px;
381
+ top: 10px;
382
  font-size: 10px;
383
  }
384
 
 
562
  </div>
563
 
564
  <div class="terminal-section">
565
+ <div class="terminal-card">
566
+ <div class="terminal-header">
567
+ <span class="terminal-icon">></span>
568
+ Shell Session
569
+ </div>
570
+ <div id="terminal"></div>
571
+ <div class="connection-status">
572
+ <div class="connection-dot" id="connection-dot"></div>
573
+ <span id="connection-text">Connecting...</span>
574
+ </div>
575
  </div>
576
  </div>
577