lato 0.3.7 → 0.3.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 617a6a9833946efc6beec01f4727fc13341a2c1993e03e82dcc82a07b7971779
4
- data.tar.gz: 16670fad7ed0c70aeb2458ff7a0f82e26ee989f4e53f4a1dbe873e8bfae5c897
3
+ metadata.gz: 9fd0952596b2c7e5ec492c78e17e6493890b7861ea270af6652831a0d4fd0a41
4
+ data.tar.gz: f72f96a8051b081e467fcb8d998d1224079f0f19ec720394a246d2dd4f223ac8
5
5
  SHA512:
6
- metadata.gz: 15b916ded489425afa8fed3d3af9160324dc2836a37a101e191c3fb5076940b960e7d1898ef7899690ac2a1e993bd39f8c799534f93e01819bf823f8ee3cfca0
7
- data.tar.gz: e801ceb370f8bd980c2d95a8d57fe60064767c502e4745f20b5f458ddf10b5ea293fdad61d7b8d07609ade0378de9a51c21d70453246020202914cc7bc69eb0d
6
+ metadata.gz: 6923a33238d0a0ab6c1fb82935af260b58c4eeecc18666a0c5387645fa6e89095f6233be8ad270cbf0864612216a2ae0e68c541f5263ce26ea10f98159d6ecee
7
+ data.tar.gz: 5ddae3839c659121ae866ffa3054fb271defc418b2f605f6e1ed0d8f0bfb3e34b2a43b00f42af8856c0160bd7d8c64935f187710129ee7f35f8c68fd90afe41e
@@ -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
@@ -1,5 +1,6 @@
1
1
  Lato::Engine.routes.draw do
2
2
  root 'application#index'
3
+ get 'offline', to: 'application#offline', as: :offline
3
4
  get 'not_found', to: 'application#not_found', as: :not_found
4
5
  get 'error', to: 'application#error', as: :error
5
6
 
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.9"
3
3
  end
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.7
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
@@ -105,6 +105,10 @@ files:
105
105
  - README.md
106
106
  - Rakefile
107
107
  - app/assets/config/lato_manifest.js
108
+ - app/assets/images/lato/user-150x150.jpg
109
+ - app/assets/images/lato/user-300x300.jpg
110
+ - app/assets/images/lato/user-600x600.jpg
111
+ - app/assets/images/lato/user-900x900.jpg
108
112
  - app/assets/javascripts/lato/application.js
109
113
  - app/assets/javascripts/lato/controllers/application.js
110
114
  - app/assets/javascripts/lato/controllers/index.js
@@ -169,6 +173,7 @@ files:
169
173
  - app/views/lato/components/_sidebar_nav_item.html.erb
170
174
  - app/views/lato/errors/error.html.erb
171
175
  - app/views/lato/errors/not_found.html.erb
176
+ - app/views/lato/errors/offline.html.erb
172
177
  - app/views/lato/mailer/invitation/invite_mail.html.erb
173
178
  - app/views/lato/mailer/user/email_verification_mail.html.erb
174
179
  - app/views/lato/mailer/user/password_update_mail.html.erb