Skip to content

Commit 52f2671

Browse files
committed
fix: Refactor file upload components and simplify CSS styles
- Replaced uppy with a simple form with a file input and a preview template. - Updated CSS styles to simplify styling and remove unnecessary code.
1 parent 086284d commit 52f2671

File tree

3 files changed

+37
-26
lines changed

3 files changed

+37
-26
lines changed

src/builder/components/left-panel.html

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@
4242
class="builder-tab-round"
4343
selected-value="active"
4444
selected-target="#uploader"
45-
selected-group="left-panels"
46-
toggle="uppy"
47-
toggle-target="#uppy"
48-
toggle-attribute="uploader">
45+
selected-group="left-panels">
4946
<i
5047
class="height:16px fill:#505050"
5148
src="/assets/svg/cloud-upload-alt.svg"></i>
@@ -265,15 +262,23 @@
265262

266263
<!-- uploader -->
267264
<div id="uploader" class="left-panel display:none">
268-
<style>
269-
.uppy-Dashboard-inner {
270-
background-color: whitesmoke !important;
271-
}
272-
.uppy-DashboardTab-btn {
273-
justify-content: flex-start;
274-
}
275-
</style>
276-
<div id="uppy" uploader="uppy" collection="files"></div>
265+
<form>
266+
<input
267+
type="file"
268+
directory
269+
template_id="file-preview"
270+
collection="files" />
271+
272+
<button actions="upload">upload</button>
273+
</form>
274+
275+
<div template="file-preview">
276+
<input file="name" value="{{name}}" />
277+
<input file="directory" value="{{directory}}" />
278+
<input file="content-type" value="{{content-type}}" />
279+
280+
<textarea file="src" value-type="string">{{src}}</textarea>
281+
</div>
277282
</div>
278283

279284
<!-- Files -->

src/builder/index.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ a {
3030
display: block
3131
}
3232

33-
.uppy-Dashboard-inner {
34-
background-color: whitesmoke!important;
35-
}
36-
37-
.uppy-DashboardTab-btn {
38-
justify-content: flex-start;
39-
}
40-
4133
input[type=number]::-webkit-inner-spin-button,
4234
input[type=number]::-webkit-outer-spin-button {
4335
opacity: 1;

src/files/form.html

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,25 @@ <h4>{{document.name}}</h4>
338338
</floating-label>
339339
</div>
340340
<div id="uploader" class="uploader" hidden>
341-
<div
342-
uploader="uppy"
343-
collection="files"
344-
document_id=""
345-
pass_id="form-fields"></div>
341+
<form>
342+
<input
343+
type="file"
344+
directory
345+
template_id="file-preview"
346+
collection="files" />
347+
348+
<button actions="upload">upload</button>
349+
</form>
350+
351+
<div template="file-preview">
352+
<input file="name" value="{{name}}" />
353+
<input file="directory" value="{{directory}}" />
354+
<input file="content-type" value="{{content-type}}" />
355+
356+
<textarea file="src" value-type="string">
357+
{{src}}
358+
</textarea>
359+
</div>
346360
</div>
347361
<button
348362
show=".uploader, .form-fields"

0 commit comments

Comments
 (0)