pinokiod 3.206.0 → 3.208.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/package.json +1 -1
- package/server/views/shell.ejs +16 -2
- package/server/views/terminal.ejs +18 -4
package/package.json
CHANGED
package/server/views/shell.ejs
CHANGED
|
@@ -207,6 +207,20 @@ body.dark #status-window b {
|
|
|
207
207
|
<script>
|
|
208
208
|
let shell_id
|
|
209
209
|
let lastNotifiedShellId = null
|
|
210
|
+
const formatUploadNotification = (files, sessionId) => {
|
|
211
|
+
if (!Array.isArray(files) || files.length === 0) {
|
|
212
|
+
return 'Upload complete (no files reported)'
|
|
213
|
+
}
|
|
214
|
+
const countLabel = files.length > 1 ? `${files.length} files attached` : 'File attached'
|
|
215
|
+
const sessionLabel = sessionId ? sessionId : '(unknown session)'
|
|
216
|
+
const summaries = files.map((file) => {
|
|
217
|
+
const name = file && (file.originalName || file.name || file.storedAs) ? (file.originalName || file.name || file.storedAs) : 'unknown'
|
|
218
|
+
const target = file && (file.cliRelativePath || file.displayPath || file.path) ? (file.cliRelativePath || file.displayPath || file.path) : ''
|
|
219
|
+
const summary = target ? `${name} → ${target}` : name
|
|
220
|
+
return summary.length > 180 ? `${summary.slice(0, 177)}…` : summary
|
|
221
|
+
})
|
|
222
|
+
return `${countLabel}<br>Session: ${sessionLabel}<br>${summaries.join('<br>')}`
|
|
223
|
+
}
|
|
210
224
|
const postMessageToAncestors = (payload) => {
|
|
211
225
|
if (!payload || typeof payload !== "object") {
|
|
212
226
|
return false
|
|
@@ -933,8 +947,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
933
947
|
}
|
|
934
948
|
} catch (_) {}
|
|
935
949
|
n.Noty({
|
|
936
|
-
text: files
|
|
937
|
-
timeout:
|
|
950
|
+
text: formatUploadNotification(files, shell_id),
|
|
951
|
+
timeout: 6000
|
|
938
952
|
})
|
|
939
953
|
}
|
|
940
954
|
if (failures.length > 0) {
|
|
@@ -182,6 +182,20 @@ body.frozen {
|
|
|
182
182
|
<link href="/terminal.css" rel="stylesheet"/>
|
|
183
183
|
<script>
|
|
184
184
|
let shell_id
|
|
185
|
+
const formatUploadNotification = (files, sessionId) => {
|
|
186
|
+
if (!Array.isArray(files) || files.length === 0) {
|
|
187
|
+
return 'Upload complete (no files reported)'
|
|
188
|
+
}
|
|
189
|
+
const countLabel = files.length > 1 ? `${files.length} files attached` : 'File attached'
|
|
190
|
+
const sessionLabel = sessionId ? sessionId : '(unknown session)'
|
|
191
|
+
const summaries = files.map((file) => {
|
|
192
|
+
const name = file && (file.originalName || file.name || file.storedAs) ? (file.originalName || file.name || file.storedAs) : 'unknown'
|
|
193
|
+
const target = file && (file.cliRelativePath || file.displayPath || file.path) ? (file.cliRelativePath || file.displayPath || file.path) : ''
|
|
194
|
+
const summary = target ? `${name} → ${target}` : name
|
|
195
|
+
return summary.length > 180 ? `${summary.slice(0, 177)}…` : summary
|
|
196
|
+
})
|
|
197
|
+
return `${countLabel}<br>Session: ${sessionLabel}<br>${summaries.join('<br>')}`
|
|
198
|
+
}
|
|
185
199
|
Dropzone.autoDiscover = false;
|
|
186
200
|
function postMessageToAncestors(payload) {
|
|
187
201
|
if (!payload || typeof payload !== "object") {
|
|
@@ -786,8 +800,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
786
800
|
files: mappedFiles
|
|
787
801
|
})
|
|
788
802
|
n.Noty({
|
|
789
|
-
text: mappedFiles
|
|
790
|
-
timeout:
|
|
803
|
+
text: formatUploadNotification(mappedFiles, shell_id),
|
|
804
|
+
timeout: 6000
|
|
791
805
|
})
|
|
792
806
|
} else {
|
|
793
807
|
refreshParent({
|
|
@@ -1030,8 +1044,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
1030
1044
|
}
|
|
1031
1045
|
} catch (_) {}
|
|
1032
1046
|
n.Noty({
|
|
1033
|
-
text: mappedFiles
|
|
1034
|
-
timeout:
|
|
1047
|
+
text: formatUploadNotification(mappedFiles, shell_id),
|
|
1048
|
+
timeout: 6000
|
|
1035
1049
|
})
|
|
1036
1050
|
}
|
|
1037
1051
|
if (failures.length > 0) {
|