lato 0.3.7 → 0.3.8
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.
- checksums.yaml +4 -4
- data/app/controllers/lato/application_controller.rb +13 -1
- data/app/views/lato/errors/offline.html.erb +11 -0
- data/config/routes.rb +1 -0
- data/lib/lato/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1db687404de50caa57771e92de805873276c6c6c5ab0270f0b2c937c5a2c92a0
|
4
|
+
data.tar.gz: 7c33db6b23a3882e887b5b49487e1f5ce021a92fc25e375cda1969d546e381e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80b25b7e6839a24be9a5041a1dbcc854a8d9257defb4fa5c6d8fd0cf62524bc846e332933324701885be9d359384ae02b5ac00e45f3f7cb0fcbdd6eaedf189f4
|
7
|
+
data.tar.gz: 1c66a00b3a9bfc71cb471df3eaec398d668271094527c88a8e25b01e8af977843dceaea955916fa9d8d6191fa5432259ebda300d551e42c20d7c308d31941372
|
@@ -14,6 +14,10 @@ module Lato
|
|
14
14
|
redirect_to @session.valid? ? session_root_path : lato.authentication_signin_path
|
15
15
|
end
|
16
16
|
|
17
|
+
def offline
|
18
|
+
respond_to_with_offline
|
19
|
+
end
|
20
|
+
|
17
21
|
def not_found
|
18
22
|
respond_to_with_not_found
|
19
23
|
end
|
@@ -52,11 +56,19 @@ module Lato
|
|
52
56
|
end
|
53
57
|
end
|
54
58
|
|
59
|
+
def respond_to_with_offline
|
60
|
+
hide_sidebar
|
61
|
+
respond_to do |format|
|
62
|
+
format.html { render 'lato/errors/offline', status: :service_unavailable }
|
63
|
+
format.json { render json: { error: 'Network not available' }, status: :service_unavailable }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
55
67
|
def respond_to_with_not_found
|
56
68
|
hide_sidebar
|
57
69
|
respond_to do |format|
|
58
70
|
format.html { render 'lato/errors/not_found', status: :not_found }
|
59
|
-
format.json { render json: {}, status: :not_found }
|
71
|
+
format.json { render json: { error: 'Resource not found' }, status: :not_found }
|
60
72
|
end
|
61
73
|
end
|
62
74
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="w-100 h-100 d-flex justify-content-center align-items-center" style="min-height: calc(100vh - 54px - 2rem)">
|
2
|
+
<div class="card w-100" style="max-width: 600px">
|
3
|
+
<div class="card-header">
|
4
|
+
<h1 class="fs-3 mb-0 text-center">Network not available</h1>
|
5
|
+
</div>
|
6
|
+
<div class="card-body text-center">
|
7
|
+
<p class="lead">Seems like you are offline.</p>
|
8
|
+
<p class="lead">You need to be connected to the internet to use this app.</p>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</div>
|
data/config/routes.rb
CHANGED
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- app/views/lato/components/_sidebar_nav_item.html.erb
|
170
170
|
- app/views/lato/errors/error.html.erb
|
171
171
|
- app/views/lato/errors/not_found.html.erb
|
172
|
+
- app/views/lato/errors/offline.html.erb
|
172
173
|
- app/views/lato/mailer/invitation/invite_mail.html.erb
|
173
174
|
- app/views/lato/mailer/user/email_verification_mail.html.erb
|
174
175
|
- app/views/lato/mailer/user/password_update_mail.html.erb
|