local-cmd-runner 1.0.6 → 1.0.7
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/package.json +1 -1
- package/public/app.js +2 -2
- package/public/index.html +1 -2
- package/public/style.css +9 -4
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -319,9 +319,9 @@ async function previewFile(path) {
|
|
|
319
319
|
const fileUrl = `/cmd/api/preview?path=${encodeURIComponent(path)}`;
|
|
320
320
|
|
|
321
321
|
if (isImage) {
|
|
322
|
-
previewBody.innerHTML = `<img src="${fileUrl}" style="max-width: 100%;
|
|
322
|
+
previewBody.innerHTML = `<img src="${fileUrl}" style="max-width: 100%; object-fit: contain; border-radius: 4px; display: block; margin: 0 auto;" />`;
|
|
323
323
|
} else if (isVideo) {
|
|
324
|
-
previewBody.innerHTML = `<video src="${fileUrl}" controls style="max-width: 100%;
|
|
324
|
+
previewBody.innerHTML = `<video src="${fileUrl}" controls style="max-width: 100%; border-radius: 4px; display: block; margin: 0 auto;"></video>`;
|
|
325
325
|
} else if (isAudio) {
|
|
326
326
|
previewBody.innerHTML = `<audio src="${fileUrl}" controls style="width: 100%; margin-top: 20px;"></audio>`;
|
|
327
327
|
} else if (isHtml) {
|
package/public/index.html
CHANGED
|
@@ -74,8 +74,7 @@
|
|
|
74
74
|
<div id="previewModal" class="modal-overlay hidden">
|
|
75
75
|
<div class="modal-content preview-modal-content">
|
|
76
76
|
<h3 id="previewTitle" style="word-break: break-all;">文件预览</h3>
|
|
77
|
-
<div class="preview-body" id="previewBody"
|
|
78
|
-
style="display: flex; flex-direction: column; align-items: center; justify-content: center;"></div>
|
|
77
|
+
<div class="preview-body" id="previewBody"></div>
|
|
79
78
|
<div class="modal-actions">
|
|
80
79
|
<button id="previewClose" class="btn-primary">关闭</button>
|
|
81
80
|
</div>
|
package/public/style.css
CHANGED
|
@@ -20,7 +20,9 @@ body {
|
|
|
20
20
|
font-family: 'Inter', sans-serif;
|
|
21
21
|
background: linear-gradient(135deg, var(--bg-color), #000000);
|
|
22
22
|
color: var(--text-primary);
|
|
23
|
-
|
|
23
|
+
height: 100vh;
|
|
24
|
+
margin: 0;
|
|
25
|
+
overflow: hidden;
|
|
24
26
|
display: flex;
|
|
25
27
|
flex-direction: column;
|
|
26
28
|
align-items: center;
|
|
@@ -33,6 +35,8 @@ body {
|
|
|
33
35
|
display: grid;
|
|
34
36
|
grid-template-columns: 1fr 350px;
|
|
35
37
|
gap: 24px;
|
|
38
|
+
flex: 1;
|
|
39
|
+
overflow: hidden;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
.container {
|
|
@@ -40,6 +44,8 @@ body {
|
|
|
40
44
|
flex-direction: column;
|
|
41
45
|
gap: 24px;
|
|
42
46
|
min-width: 0;
|
|
47
|
+
height: 100%;
|
|
48
|
+
overflow: hidden;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
header {
|
|
@@ -163,8 +169,8 @@ input[type="text"]:focus {
|
|
|
163
169
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
|
|
164
170
|
display: flex;
|
|
165
171
|
flex-direction: column;
|
|
166
|
-
|
|
167
|
-
|
|
172
|
+
flex: 1;
|
|
173
|
+
min-height: 200px;
|
|
168
174
|
}
|
|
169
175
|
|
|
170
176
|
.terminal-header {
|
|
@@ -347,7 +353,6 @@ input[type="text"]:focus {
|
|
|
347
353
|
flex-direction: column;
|
|
348
354
|
overflow: hidden;
|
|
349
355
|
height: 100%;
|
|
350
|
-
max-height: calc(100vh - 80px); /* accounting for body padding */
|
|
351
356
|
}
|
|
352
357
|
|
|
353
358
|
.fm-header {
|