Skip to content

Commit cba6a10

Browse files
save file
1 parent f834e92 commit cba6a10

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

utils/misc/nodejs-terminal/v2.0/nodejs-terminal-v2.0.html

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140

141141

142142
#hdr
143-
{}
143+
{display:flex;gap:20px;align-items:center}
144144

145145
#hldr
146146
{padding:10px;border:2px solid lightgray;box-sizing:border-box;flex:1}
@@ -156,8 +156,10 @@
156156

157157
</style>
158158

159+
159160
<link rel=stylesheet href='https://cdn.jsdelivr.net/npm/@xterm/xterm@5.5.0/css/xterm.css' anonymous>
160161

162+
161163
</head>
162164

163165

@@ -174,6 +176,8 @@
174176
<div id=hdr>
175177

176178
<file-mod component></file-mod>
179+
<div id=filename></div>
180+
<div id=size></div>
177181

178182
</div>
179183

@@ -196,7 +200,7 @@
196200

197201
var webcontainer;
198202

199-
203+
var ui = {};
200204
var complete = {};
201205

202206

@@ -222,6 +226,26 @@
222226
}//initdom
223227

224228

229+
//:
230+
231+
232+
ui.info = function(){
233+
234+
var str = '';
235+
if(cur.file){
236+
str = cur.file.name;
237+
}
238+
$('#hdr #filename').textContent = str;
239+
240+
var str = '';
241+
if(cur.blob){
242+
str = cur.blob.size;
243+
}
244+
$('#hdr #size').textContent = str;
245+
246+
}//info
247+
248+
225249
//:
226250

227251

@@ -234,7 +258,7 @@
234258

235259
cur.file = file;
236260
cur.blob = blob;
237-
261+
ui.info();
238262

239263
}//load
240264

0 commit comments

Comments
 (0)