Skip to content

Commit 0e8ca35

Browse files
committed
Display site size error
1 parent 1cedf8e commit 0e8ca35

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

css/ZeroHello.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ ul, li { margin: 0px; padding: 0px; list-style-type: none }
141141
.site-downloading { box-shadow: inset 0px -100px 0px -1px rgba(45, 192, 129, 1) }
142142
.site-downloading .site { background-color: rgba(38, 194, 129, 0.85) }
143143

144+
.site.error { background-color: #C0392B }
145+
.site.error {box-shadow: inset 0px 0px 0px 3px #E74C3C }
146+
.site.error .status { background: #F1C40F; color: black }
144147

145148
/* Menu */
146149

css/all.css

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/ZeroHello.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ class ZeroHello extends ZeroFrame
147147
error = "#{site.bad_files} file update failed"
148148
if error
149149
$(".notify", elem).text(error).removeClass("success").addClassLater("visible")
150+
151+
# Site error
152+
if site.settings.size > site.settings.size_limit*1000*1000
153+
$(".notify", elem).text("Check size limit")
154+
$(".site", elem).addClass("error")
155+
$(".status", elem).text("?")
150156

151157
# Hide error/success
152158
if not error and not success

js/all.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,11 @@ jQuery.extend( jQuery.easing,
10761076
if (error) {
10771077
$(".notify", elem).text(error).removeClass("success").addClassLater("visible");
10781078
}
1079+
if (site.settings.size > site.settings.size_limit * 1000 * 1000) {
1080+
$(".notify", elem).text("Check size limit");
1081+
$(".site", elem).addClass("error");
1082+
$(".status", elem).text("?");
1083+
}
10791084
if (!error && !success) {
10801085
$(".notify", elem).removeClass("visible");
10811086
}

0 commit comments

Comments
 (0)