Skip to content

Commit 181cf47

Browse files
committed
regen
1 parent de35f5c commit 181cf47

File tree

7 files changed

+61
-36
lines changed

7 files changed

+61
-36
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Logs
22

3+
## v0.5.1
4+
5+
- tweak file list style
6+
- prevent selection on load button
7+
- add css classes in file list
8+
- prevent fetching if paginate is not fetchable
9+
- hide load button if not fetchable
10+
11+
312
## v0.5.0
413

514
- breaking changes

index.css

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
transition: width 0.15s ease-in-out;
102102
}
103103
.uploadr-load {
104+
user-select: none;
104105
height: fit-content;
105106
width: 100%;
106107
max-width: 100%;
@@ -123,35 +124,45 @@
123124
gap: 0.5em;
124125
justify-content: space-between;
125126
}
126-
.uploadr-list-file .uploadr-item .uploadr-item-cell:nth-child(1) {
127-
flex: 1 0 auto;
128-
text-align: left;
129-
}
130-
.uploadr-list-file .uploadr-item .uploadr-item-cell:nth-child(2) {
131-
flex: 0 0 auto;
132-
width: 6em;
133-
text-align: right;
134-
}
135-
.uploadr-list-file .uploadr-item .uploadr-item-cell:nth-child(3) {
136-
flex: 0 0 auto;
137-
width: 15em;
138-
text-align: right;
139-
}
140-
.uploadr-list-file .uploadr-item .uploadr-item-cell:nth-child(4) {
141-
flex: 0 0 auto;
142-
width: 3em;
143-
text-align: right;
144-
}
145127
.uploadr-list-file .uploadr-item-ctrl {
146128
position: static;
147129
}
148-
.uploadr-list-file .uploadr-item-ctrl .inner {
130+
.uploadr-list-file .uploadr-item-ctrl .uploadr-item-ctrl-info {
149131
width: 100%;
150132
}
151133
.uploadr-list-file .uploadr-load {
152134
margin: 0;
153135
justify-content: center;
154136
}
137+
.uploadr-list-file .uploadr-item-name {
138+
width: calc(40% - 1em);
139+
flex-grow: 1;
140+
overflow: hidden;
141+
text-overflow: ellipsis;
142+
text-align: left;
143+
white-space: nowrap;
144+
}
145+
.uploadr-list-file .uploadr-item-size {
146+
width: 20%;
147+
flex-grow: 1;
148+
overflow: hidden;
149+
text-overflow: ellipsis;
150+
text-align: right;
151+
white-space: nowrap;
152+
}
153+
.uploadr-list-file .uploadr-item-modifiedtime {
154+
width: 30%;
155+
flex-grow: 1;
156+
overflow: hidden;
157+
text-overflow: ellipsis;
158+
text-align: right;
159+
white-space: nowrap;
160+
}
161+
@media (max-width: 800px) {
162+
.uploadr-list-file .uploadr-item-modifiedtime {
163+
display: none;
164+
}
165+
}
155166
.uploadr.uploadr-uploader {
156167
position: relative;
157168
display: flex;

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@
419419
}
420420
},
421421
handler: {
422+
load: function(arg$){
423+
var node;
424+
node = arg$.node;
425+
return node.classList.toggle('d-none', !this$._.page.fetchable());
426+
},
422427
file: {
423428
list: function(){
424429
return this$._.files || [];
@@ -542,7 +547,7 @@
542547
return results$;
543548
},
544549
fetch: function(){
545-
if (this._.running) {
550+
if (this._.running || !this._.page.fetchable()) {
546551
return;
547552
}
548553
this._.loader.on();

index.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"author":"zbryikt","name":"@plotdb/uploadr","license":"MIT","description":"File Upload Library","version":"0.5.0","style":"index.min.css","browser":"index.min.js","exports":{".":"./server/index.js","./*":"./server/*","./providers/*":"./server/providers/*/index.js"},"homepage":"https://github.com/plotdb/uploadr","repository":{"type":"git","url":"https://github.com/plotdb/uploadr"},"engines":{"node":">=10.14.1","npm":">=6.4.1"},"scripts":{"start":"./node_modules/.bin/lsc web/server.ls","release":"npx fedep publish; npx fedep publish -g"},"devDependencies":{"@google-cloud/storage":"^5.7.3","@loadingio/bootstrap.ext":"^0.0.12","@plotdb/block":"^5.5.4","@plotdb/colors":"^0.0.3","@plotdb/csscope":"^5.0.4","@plotdb/rescope":"^5.0.15","@plotdb/semver":"^0.0.3","@plotdb/srcbuild":"^0.0.69","@plotdb/suuid":"^0.5.1","@zbryikt/template":"v2.4.1","body-parser":"^2.2.0","bootstrap":"^4.6.1","express":"^4.17.1","fedep":"^1.5.0","fs-extra":"^9.1.0","i18next":"^25.6.0","ldcover":"^3.5.4","ldiconfont":"^0.2.8","ldnotify":"^0.0.6","livescript":"^1.6.0","stylus":"^0.55.0","uglify-js":"^3.13.1","uglifycss":"0.0.29"},"dependencies":{"@loadingio/debounce.js":"^1.0.1","@loadingio/ldquery":"^3.0.6","@loadingio/paginate":"^0.1.1","express-formidable":"github:plotdb/express-formidable","imgtype":"github:plotdb/imgtype","ldloader":"^3.0.3","ldview":"^1.5.1","proxise":"^1.0.1"},"peerDependencies":{"@loadingio/debounce.js":"^1.0.1","@loadingio/ldquery":"^3.0.6","@loadingio/paginate":"^0.1.1","ldloader":"^3.0.3","ldview":"^1.5.1","proxise":"^1.0.1"},"frontendDependencies":{"root":"web/static/assets/lib","modules":["bootstrap","@loadingio/bootstrap.ext","@loadingio/ldquery","@loadingio/paginate","@loadingio/debounce.js","@plotdb/semver","@plotdb/csscope","@plotdb/rescope","@plotdb/block","i18next","ldview","ldcover","ldiconfont","ldloader","ldnotify","proxise"]}}
1+
{"author":"zbryikt","name":"@plotdb/uploadr","license":"MIT","description":"File Upload Library","version":"0.5.1","style":"index.min.css","browser":"index.min.js","exports":{".":"./server/index.js","./*":"./server/*","./providers/*":"./server/providers/*/index.js"},"homepage":"https://github.com/plotdb/uploadr","repository":{"type":"git","url":"https://github.com/plotdb/uploadr"},"engines":{"node":">=10.14.1","npm":">=6.4.1"},"scripts":{"start":"./node_modules/.bin/lsc web/server.ls","release":"npx fedep publish; npx fedep publish -g"},"devDependencies":{"@google-cloud/storage":"^5.7.3","@loadingio/bootstrap.ext":"^0.0.12","@plotdb/block":"^5.5.4","@plotdb/colors":"^0.0.3","@plotdb/csscope":"^5.0.4","@plotdb/rescope":"^5.0.15","@plotdb/semver":"^0.0.3","@plotdb/srcbuild":"^0.0.69","@plotdb/suuid":"^0.5.1","@zbryikt/template":"v2.4.1","body-parser":"^2.2.0","bootstrap":"^4.6.1","express":"^4.17.1","fedep":"^1.5.0","fs-extra":"^9.1.0","i18next":"^25.6.0","ldcover":"^3.5.4","ldiconfont":"^0.2.8","ldnotify":"^0.0.6","livescript":"^1.6.0","stylus":"^0.55.0","uglify-js":"^3.13.1","uglifycss":"0.0.29"},"dependencies":{"@loadingio/debounce.js":"^1.0.1","@loadingio/ldquery":"^3.0.6","@loadingio/paginate":"^0.1.1","express-formidable":"github:plotdb/express-formidable","imgtype":"github:plotdb/imgtype","ldloader":"^3.0.3","ldview":"^1.5.1","proxise":"^1.0.1"},"peerDependencies":{"@loadingio/debounce.js":"^1.0.1","@loadingio/ldquery":"^3.0.6","@loadingio/paginate":"^0.1.1","ldloader":"^3.0.3","ldview":"^1.5.1","proxise":"^1.0.1"},"frontendDependencies":{"root":"web/static/assets/lib","modules":["bootstrap","@loadingio/bootstrap.ext","@loadingio/ldquery","@loadingio/paginate","@loadingio/debounce.js","@plotdb/semver","@plotdb/csscope","@plotdb/rescope","@plotdb/block","i18next","ldview","ldcover","ldiconfont","ldloader","ldnotify","proxise"]}}

server/index.pug

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ mixin uploadr-uploader(opt)
2626
.uploadr-item-ctrl-delete(ld="delete")
2727
else
2828
.uploadr-item.uploadr-head
29-
.uploadr-item-cell(t) Name
30-
.uploadr-item-cell(t) Size
31-
.uploadr-item-cell(t) Modified Date
29+
.uploadr-item-cell.uploadr-item-name(t) Name
30+
.uploadr-item-cell.uploadr-item-size(t) Size
31+
.uploadr-item-cell.uploadr-item-modifiedtime(t) Modified Date
3232
.uploadr-item-cell  
3333
.uploadr-item(ld-each="file")
34-
.uploadr-item-cell(style="position:relative")
34+
.uploadr-item-cell.uploadr-item-name(style="position:relative")
3535
span(ld="name")
3636
.uploadr-progress(ld="progress")
37-
.uploadr-item-cell(ld="size")
38-
.uploadr-item-cell(ld="modifiedtime")
37+
.uploadr-item-cell.uploadr-item-size(ld="size")
38+
.uploadr-item-cell.uploadr-item-modifiedtime(ld="modifiedtime")
3939
.uploadr-item-cell(ld="delete")
4040

4141
.uploadr-loader: .ldld.default(ld="loader")
@@ -50,16 +50,16 @@ mixin uploadr-viewer(opt)
5050
.uploadr-list(class=(type=="file"?"uploadr-list-file":"uploadr-list-image"))
5151
if type == "file"
5252
.uploadr-item.uploadr-head
53-
.uploadr-item-cell(t) Name
54-
.uploadr-item-cell(t) Size
55-
.uploadr-item-cell(t) Modified Date
53+
.uploadr-item-cell.uploadr-item-name(t) Name
54+
.uploadr-item-cell.uploadr-item-size(t) Size
55+
.uploadr-item-cell.uploadr-item-modifiedtime(t) Modified Date
5656
.uploadr-item(ld-each="file")
5757
if type == "image"
5858
img(ld="thumb")
5959
if type == "file"
60-
.uploadr-item-cell(ld="name")
61-
.uploadr-item-cell(ld="size")
62-
.uploadr-item-cell(ld="modifiedtime")
60+
.uploadr-item-cell.uploadr-item-name(ld="name")
61+
.uploadr-item-cell.uploadr-item-size(ld="size")
62+
.uploadr-item-cell.uploadr-item-modifiedtime(ld="modifiedtime")
6363
.uploadr-item.uploadr-load.position-relative(ld="load",t)
6464
span Load More
6565
.uploadr-loader: .ldld.default(ld="loader")

0 commit comments

Comments
 (0)