diff --git a/server/routes/resources.go b/server/routes/resources.go index 8c045ac..ffd904b 100644 --- a/server/routes/resources.go +++ b/server/routes/resources.go @@ -24,7 +24,7 @@ func (rt *Router) UploadSimulationResource(w http.ResponseWriter, r *http.Reques return } - err = r.ParseMultipartForm(500 << 20) // 500 MB max memory/file bounds + err = r.ParseMultipartForm(32 << 20) // 32 MB max memory bounds, rest spills to disk if err != nil { http.Error(w, "Error parsing form: "+err.Error(), http.StatusBadRequest) return diff --git a/src/lib/MediaItem.svelte b/src/lib/MediaItem.svelte index ae78128..13f16d4 100644 --- a/src/lib/MediaItem.svelte +++ b/src/lib/MediaItem.svelte @@ -1,6 +1,8 @@ @@ -28,6 +31,11 @@ [Download] + {#if isVideo(resourceName)} + + {/if} {#if isEditing} - + + {/if} @@ -538,11 +569,15 @@ background-color: #e0e0e0; font-family: inherit; } - .edit-btn:hover, - .save-btn:hover, - .cancel-btn:hover { + .edit-btn:hover:not(:disabled), + .save-btn:hover:not(:disabled), + .cancel-btn:hover:not(:disabled) { background-color: #d0d0d0; } + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } .delete-btn { background-color: #ffcccc; color: #990000; @@ -569,16 +604,39 @@ align-items: center; gap: 10px; } - .form-group label { + .edit-form label { + display: inline-block; + width: 100px; font-weight: bold; - min-width: 120px; } - .form-group input[type="text"] { + .edit-form input[type="text"] { flex: 1; - max-width: 400px; padding: 5px; - font-family: inherit; border: 1px solid #000; + font-family: inherit; + } + .progress-bar-container { + width: 100%; + background-color: #ddd; + border: 1px solid #000; + margin-top: 10px; + position: relative; + height: 25px; + } + .progress-bar { + height: 100%; + background-color: #4CAF50; + transition: width 0.2s ease-in-out; + } + .progress-text { + position: absolute; + width: 100%; + text-align: center; + top: 0; + left: 0; + line-height: 25px; + font-weight: bold; + color: #000; } .form-group input[type="file"] { font-family: inherit;