lesli 5.1.9 → 5.1.11

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: 4ee3156ee2bbab3464a0f87d5464bf3d1bc0822eb26365ade32c75cdc40cfafa
4
- data.tar.gz: 2ae503e439f2571995336e2f27e818ebfd5aee07d3e12b2e2cba147145e5aba2
3
+ metadata.gz: aa86270cf08e4ff106a306b2ceb42481fdec815b1c61116cd6ce1fe663eee7c2
4
+ data.tar.gz: 16bf6f50e50be7c6e15a62baa65f895aff6ff281caa908126df45eac600a41b0
5
5
  SHA512:
6
- metadata.gz: 7e50643cd811ecc96b89276098798cf66962dba64a3d69cc17135d60a751a9b7ab4d5138c218e93f85a133dc5385edef161a04654afcaa866b84c323caa42dfb
7
- data.tar.gz: 064ac6c21289d1e15ad25d9014e3f00ed4bb0bd975775a40a65be12c633fd847f1c7ac3db610e0921bcfdd46acb5a11d1acd50c067bd7806751b76c604a61251
6
+ metadata.gz: 899d1dab67d817ec7161aa2b8613f273f8371aced01c6064244e89ec19d4dc11980f108f99fa34a15b72de4ed462ea997546c62cfc3e158ebb6fbd79c24aa22c
7
+ data.tar.gz: 31175c1e7a29303a1f65dbfb70801856c6e6e94c37f498e6c81094f73b6e3dac6571a1c5abef7362398f31a4528d5f623c066c403d39b3e05bb676ba47055c4a
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="#0d52bf" data-name="Layer 1" viewBox="0 0 716.56 292.44">
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="#276AD6" data-name="Layer 1" viewBox="0 0 716.56 292.44">
2
2
  <path d="M214.181 204.066v40.883H105.328V59.095h42.48v144.97zM294.859 213.088c10.885 0 20.18-4.242 25.49-10.09l31.86 18.324c-13.014 18.051-32.656 27.346-57.916 27.346-45.404 0-73.546-30.535-73.546-70.092s28.756-70.099 70.685-70.099c38.762 0 67.44 30.005 67.44 70.099a77.279 77.279 0 0 1-1.59 15.93h-94.256c5.045 13.802 17.256 18.582 31.833 18.582zm24.422-48.321c-4.243-15.4-16.196-20.975-28.142-20.975-15.134 0-25.224 7.438-28.936 20.975zM476.476 205.126c0 30.528-26.515 43.542-55.222 43.542-26.515 0-46.751-10.09-57.085-31.596l34.519-19.649c3.447 10.09 10.885 15.665 22.566 15.665 9.56 0 14.332-2.917 14.332-8.227 0-14.604-65.312-6.908-65.312-52.836 0-28.943 24.423-43.548 52.04-43.548 21.506 0 40.625 9.56 51.776 28.414L440.1 155.207c-3.72-6.9-9.022-11.68-17.786-11.68-6.901 0-11.165 2.658-11.165 7.43.014 15.136 65.326 5.046 65.326 54.17zM493.725 51.134h39.823v193.815h-39.823zM560.091 112.196h39.83V244.95h-39.83z" class="cls-1"/>
3
3
  <circle cx="580.006" cy="69.932" r="25.322" class="cls-1"/>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
2
  /*!
3
3
 
4
4
  Lesli
@@ -55,13 +55,11 @@ Building a better future, one line of code at a time.
55
55
  .py-6 {
56
56
  padding-block: calc(var(--spacing) * 6);
57
57
  }
58
- .sm\:gap-6 {
59
- @media (width >= 40rem) {
58
+ @media (width >= 40rem) {
59
+ .sm\:gap-6 {
60
60
  gap: calc(var(--spacing) * 6);
61
61
  }
62
- }
63
- .sm\:py-8 {
64
- @media (width >= 40rem) {
62
+ .sm\:py-8 {
65
63
  padding-block: calc(var(--spacing) * 8);
66
64
  }
67
65
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2025, Lesli Technologies, S. A.
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ module Lesli
42
42
 
43
43
  protect_from_forgery with: :exception
44
44
 
45
- before_action :set_locale
45
+ before_action :set_locale
46
46
  before_action :authenticate_request if defined?(LesliShield)
47
47
  before_action :authorize_request if defined?(LesliShield)
48
48
  before_action :set_customizer
@@ -337,6 +337,16 @@ module Lesli
337
337
  controller_path.include?("cloud_development"))
338
338
  end
339
339
 
340
+ def application_dashboard_path
341
+ if defined?(LesliDashboard) && respond_to?(:lesli_dashboard)
342
+ lesli_dashboard.root_path
343
+ elsif main_app.respond_to?(:root_path)
344
+ main_app.root_path
345
+ else
346
+ "/"
347
+ end
348
+ end
349
+
340
350
  private
341
351
 
342
352
  # build a html link for an engine path
@@ -36,7 +36,7 @@ module Lesli
36
36
  # Set the user language based on user_settings, session configuration or instance default locale
37
37
  def set_locale
38
38
  # get saved language in session, browser language or the default in config
39
- # the session param is setted in settings controller through "get :language, to: "settings#language""
39
+ # the session param is setted in settings controller through "get :language, to: "settings#language"
40
40
  locale = session[:locale] || I18n.default_locale
41
41
 
42
42
  # get user's preferred language
@@ -94,7 +94,7 @@ module Lesli
94
94
  subject:nil # resource related to the log
95
95
  )
96
96
 
97
- return unless defined?(LesliAudit)
97
+ return unless defined?(LesliAudit) && respond_to?(:logs)
98
98
 
99
99
  self.logs.create!({
100
100
  engine: engine,
@@ -0,0 +1,37 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ module Lesli
34
+ class ApplicationRecord < ActiveRecord::Base
35
+ self.abstract_class = true
36
+ end
37
+ end
@@ -33,7 +33,6 @@ Building a better future, one line of code at a time.
33
33
  module Lesli
34
34
  class User < ApplicationLesliRecord
35
35
  include Lesli::UserExtensions
36
- include LesliShield::UserSecurity if defined?(LesliShield)
37
36
 
38
37
  # user required configuration
39
38
  validates(:email,
@@ -66,9 +65,6 @@ module Lesli
66
65
  has_many :tokens
67
66
  has_many :settings
68
67
  has_many :sessions, class_name: 'LesliShield::User::Session'
69
- has_many :requests, class_name: 'LesliAudit::UserRequest'
70
- has_many :journals, class_name: 'LesliAudit::UserJournal'
71
- has_many :logs, class_name: 'LesliAudit::UserLog'
72
68
 
73
69
 
74
70
  # Users can have many roles and too many privileges through the roles
@@ -148,5 +148,22 @@ module Lesli
148
148
 
149
149
  self
150
150
  end
151
+
152
+ def sessions
153
+ resource.sessions
154
+ end
155
+
156
+ def roles
157
+ resource.roles
158
+ end
159
+
160
+ def logs
161
+ return [] unless defined?(LesliAudit)
162
+ resource.logs
163
+ .order(id: :desc)
164
+ .select(:id, :operation, :description, Date2.new.db_column('created_at', as:'date'))
165
+ .limit(7)
166
+ .as_json
167
+ end
151
168
  end
152
169
  end
@@ -1,137 +1,281 @@
1
- <style>
2
- html, body, * {
3
- box-sizing: border-box;
4
- }
5
-
6
- html, body {
7
- margin: 0;
8
- padding: 0;
9
- }
10
-
11
- .page-welcome {
12
- display: flex;
13
- flex-direction: column;
14
- justify-content: center;
15
- align-content: center;
16
- align-items: center;
17
- height: 100vh;
18
- padding-bottom: 4rem;
19
- background-size: 115px 115px;
20
- background-color: #ffffff;
21
- background-position: 0 0,55px 55px;
22
- background-image:
23
- radial-gradient(#123553 1px, transparent 2px),
24
- radial-gradient(#123553 1px, #ffffff 2px);
25
- animation: rotateBackground 10s linear infinite;
26
- }
27
-
28
- .page-welcome svg {
29
- width: 320px;
30
- background-color: white;
31
- }
32
-
33
- .page-welcome h1 {
34
- font-size: 4rem;
35
- max-width: 960px;
36
- font-weight: 900;
37
- text-align: center;
38
- line-height: 1.1;
39
- margin: 0px auto 2rem;
40
- letter-spacing: -.5px;
41
- background-color: white;
42
- color: #4d4d4d;
43
- }
44
-
45
- .page-welcome h1 span {
46
- background: -webkit-linear-gradient(315deg,#4F83AE 25%,#123553);
47
- background-clip: border-box;
48
- background-clip: text;
49
- -webkit-background-clip: text;
50
- -webkit-text-fill-color: transparent;
51
- }
52
-
53
- .page-welcome a {
54
- font-size: 1.4rem;
55
- font-family: "OpenSans", "Ubuntu", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
56
- background-color: white;
57
- color: #245F93;
58
- display: flex;
59
- align-items: center;
60
- }
61
-
62
- .page-welcome .buttons {
63
- margin-bottom: 2rem;
64
- }
65
-
66
- .page-welcome .buttons a {
67
- border: none;
68
- display: inline-block;
69
- text-decoration: none;
70
- border-radius: 8px;
71
- box-shadow: 0 2px 8px -1px rgba(10, 22, 50, .24);
72
-
73
- margin: 0;
74
- color: #ffffff;
75
- padding: 14px 40px;
76
- text-align: center;
77
- font-size: 1rem;
78
- font-weight: 500;
79
- line-height: 28px;
80
- }
81
-
82
- .page-welcome .buttons a.doc {
83
- background: #245F93;
84
- }
85
-
86
- .page-welcome .buttons a.start {
87
- background: #5F6C7D;
88
- }
89
-
90
- @media only screen and (max-width: 600px) {
91
- .page-welcome .page-welcome svg {
92
- width: 250px;
93
- }
94
-
95
- .page-welcome .page-welcome h1 {
96
- padding: 0 1rem;
97
- font-size: 2.7rem;
98
- }
99
-
100
- .page-welcome .buttons a {
101
- padding: 14px 20px;
102
- }
103
- }
104
-
105
- @keyframes rotateBackground {
106
- to {
107
- background-position: 115px 115px, 170px 170px;
108
- }
109
- }
110
- </style>
111
-
112
- <section class="page-welcome">
113
- <svg xmlns="http://www.w3.org/2000/svg" fill="#245F93" data-name="Layer 1" viewBox="0 0 716.56 292.44">
114
- <path d="M214.181 204.066v40.883H105.328V59.095h42.48v144.97zM294.859 213.088c10.885 0 20.18-4.242 25.49-10.09l31.86 18.324c-13.014 18.051-32.656 27.346-57.916 27.346-45.404 0-73.546-30.535-73.546-70.092s28.756-70.099 70.685-70.099c38.762 0 67.44 30.005 67.44 70.099a77.279 77.279 0 0 1-1.59 15.93h-94.256c5.045 13.802 17.256 18.582 31.833 18.582zm24.422-48.321c-4.243-15.4-16.196-20.975-28.142-20.975-15.134 0-25.224 7.438-28.936 20.975zM476.476 205.126c0 30.528-26.515 43.542-55.222 43.542-26.515 0-46.751-10.09-57.085-31.596l34.519-19.649c3.447 10.09 10.885 15.665 22.566 15.665 9.56 0 14.332-2.917 14.332-8.227 0-14.604-65.312-6.908-65.312-52.836 0-28.943 24.423-43.548 52.04-43.548 21.506 0 40.625 9.56 51.776 28.414L440.1 155.207c-3.72-6.9-9.022-11.68-17.786-11.68-6.901 0-11.165 2.658-11.165 7.43.014 15.136 65.326 5.046 65.326 54.17zM493.725 51.134h39.823v193.815h-39.823zM560.091 112.196h39.83V244.95h-39.83z" class="cls-1"/>
115
- <circle cx="580.006" cy="69.932" r="25.322" class="cls-1"/>
116
- </svg>
117
- <h1>
118
- The Open Source Ruby on Rails <span>SaaS Development Framework</span>
119
- </h1>
120
- <div class="buttons">
121
- <a class="doc" target="blank" href="https://www.lesli.dev/lesli/">
122
- Documentation
123
- </a>
124
- <a class="start" target="blank" href="https://www.lesli.dev/start/">
125
- Getting started
126
- </a>
127
- </div>
128
- <% unless defined?(LesliShield) %>
129
- <%= link_to("Apps", "/lesli/apps") unless defined?(LesliDashboard) %>
130
- <% end %>
131
- <% if defined?(LesliShield) %>
132
- <%= link_to("Apps", "/lesli/apps") if user_signed_in? && !defined?(LesliDashboard) %>
133
- <%= link_to("Dashboard", "/dashboard") if user_signed_in? && defined?(LesliDashboard) %>
134
- <%= link_to("Logout", "/logout") if user_signed_in? %>
135
- <%= link_to("Login", "/login") unless user_signed_in? %>
136
- <% end %>
137
- </section>
1
+ <% content_for :head do %>
2
+ <style>
3
+ :root {
4
+ --welcome-primary: var(--lesli-color-primary-500, #276AD6);
5
+ --welcome-primary-light: var(--lesli-color-primary-400, #4C83EA);
6
+ --welcome-primary-dark: var(--lesli-color-primary-900, #0C2856);
7
+ --welcome-primary-soft: var(--lesli-color-primary-100, #E3EEFF);
8
+ --welcome-ink: var(--lesli-color-neutral-900, #1F2933);
9
+ --welcome-muted: var(--lesli-color-neutral-600, #4B5663);
10
+ --welcome-border: var(--lesli-color-neutral-200, #E5EAF0);
11
+ }
12
+
13
+ html,
14
+ body {
15
+ min-height: 100%;
16
+ margin: 0;
17
+ }
18
+
19
+ .welcome-page,
20
+ .welcome-page * {
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ .welcome-page {
25
+ position: relative;
26
+ isolation: isolate;
27
+ display: grid;
28
+ min-height: 100vh;
29
+ min-height: 100svh;
30
+ place-items: center;
31
+ overflow: hidden;
32
+ padding: clamp(1rem, 2vw, 2rem) clamp(1.25rem, 4vw, 3.5rem);
33
+ color: var(--welcome-ink);
34
+ background:
35
+ radial-gradient(circle at 15% 15%, rgba(79, 131, 174, .17), transparent 30rem),
36
+ radial-gradient(circle at 85% 80%, rgba(36, 95, 147, .12), transparent 28rem),
37
+ linear-gradient(145deg, #fbfdff 0%, #f4f8fb 100%);
38
+ font-family: "OpenSans", "Segoe UI", sans-serif;
39
+ }
40
+
41
+ .welcome-page::before {
42
+ position: absolute;
43
+ z-index: -1;
44
+ inset: 0;
45
+ background-image: radial-gradient(rgba(36, 95, 147, .32) 1px, transparent 1.25px);
46
+ background-size: 56px 56px;
47
+ content: "";
48
+ -webkit-mask-image: linear-gradient(115deg, #000 0%, transparent 72%);
49
+ mask-image: linear-gradient(115deg, #000 0%, transparent 72%);
50
+ pointer-events: none;
51
+ }
52
+
53
+ .welcome-hero {
54
+ width: min(100%, 62rem);
55
+ padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 7vw, 6rem);
56
+ border: 1px solid rgba(255, 255, 255, .86);
57
+ border-radius: clamp(1.5rem, 3vw, 2.5rem);
58
+ background: rgba(255, 255, 255, .76);
59
+ box-shadow: 0 28px 80px rgba(18, 53, 83, .12);
60
+ text-align: center;
61
+ -webkit-backdrop-filter: blur(18px);
62
+ backdrop-filter: blur(18px);
63
+ }
64
+
65
+ .welcome-content {
66
+ min-width: 0;
67
+ }
68
+
69
+ .welcome-brand {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: center;
73
+ }
74
+
75
+ .welcome-brand img {
76
+ width: clamp(9rem, 15vw, 12rem);
77
+ height: auto;
78
+ }
79
+
80
+ .welcome-kicker {
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ gap: .6rem;
85
+ margin: clamp(1.5rem, 3vw, 2rem) 0 0;
86
+ color: var(--welcome-primary);
87
+ font-size: .78rem;
88
+ font-weight: 800;
89
+ letter-spacing: .13em;
90
+ text-transform: uppercase;
91
+ }
92
+
93
+ .welcome-kicker::before {
94
+ width: .55rem;
95
+ height: .55rem;
96
+ border-radius: 50%;
97
+ background: var(--welcome-primary-light);
98
+ box-shadow: 0 0 0 5px rgba(79, 131, 174, .12);
99
+ content: "";
100
+ }
101
+
102
+ .welcome-title {
103
+ max-width: 12ch;
104
+ margin: 1rem auto 0;
105
+ font-family: "Domine", Georgia, serif;
106
+ font-size: clamp(2.65rem, 5vw, 4.6rem);
107
+ font-weight: 650;
108
+ letter-spacing: -.05em;
109
+ line-height: 1.03;
110
+ text-wrap: balance;
111
+ }
112
+
113
+ .welcome-title span {
114
+ color: var(--welcome-primary);
115
+ background: linear-gradient(100deg, var(--welcome-primary-light), var(--welcome-primary-dark));
116
+ background-clip: text;
117
+ -webkit-background-clip: text;
118
+ -webkit-text-fill-color: transparent;
119
+ }
120
+
121
+ .welcome-summary {
122
+ max-width: 37rem;
123
+ margin: 1.25rem auto 0;
124
+ color: var(--welcome-muted);
125
+ font-size: clamp(1rem, 1.8vw, 1.16rem);
126
+ line-height: 1.7;
127
+ }
128
+
129
+ .welcome-actions {
130
+ display: flex;
131
+ flex-wrap: wrap;
132
+ justify-content: center;
133
+ gap: .75rem;
134
+ margin-top: 1.75rem;
135
+ }
136
+
137
+ .welcome-button {
138
+ display: inline-flex;
139
+ min-height: 3.2rem;
140
+ align-items: center;
141
+ justify-content: center;
142
+ gap: .55rem;
143
+ padding: .8rem 1.45rem;
144
+ border: 1px solid transparent;
145
+ border-radius: .8rem;
146
+ font-size: .94rem;
147
+ font-weight: 700;
148
+ line-height: 1;
149
+ text-decoration: none;
150
+ transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
151
+ }
152
+
153
+ .welcome-button:hover {
154
+ transform: translateY(-2px);
155
+ }
156
+
157
+ .welcome-button:focus-visible,
158
+ .welcome-access a:focus-visible {
159
+ outline: 3px solid rgba(36, 95, 147, .28);
160
+ outline-offset: 3px;
161
+ }
162
+
163
+ .welcome-button--primary {
164
+ color: #fff;
165
+ background: var(--welcome-primary);
166
+ box-shadow: 0 10px 24px rgba(36, 95, 147, .22);
167
+ }
168
+
169
+ .welcome-button--primary:hover {
170
+ background: var(--welcome-primary-dark);
171
+ box-shadow: 0 14px 30px rgba(36, 95, 147, .26);
172
+ }
173
+
174
+ .welcome-button--secondary {
175
+ border-color: var(--welcome-border);
176
+ color: var(--welcome-primary-dark);
177
+ background: rgba(255, 255, 255, .82);
178
+ }
179
+
180
+ .welcome-button--secondary:hover {
181
+ border-color: var(--welcome-primary-soft);
182
+ background: var(--welcome-primary-soft);
183
+ }
184
+
185
+ .welcome-access {
186
+ display: flex;
187
+ flex-wrap: wrap;
188
+ justify-content: center;
189
+ gap: .5rem 1.25rem;
190
+ margin-top: 1.35rem;
191
+ font-size: .86rem;
192
+ }
193
+
194
+ .welcome-access a {
195
+ color: var(--welcome-muted);
196
+ font-weight: 700;
197
+ text-underline-offset: .22em;
198
+ }
199
+
200
+ @media (max-width: 900px) {
201
+ .welcome-page {
202
+ overflow: auto;
203
+ }
204
+ }
205
+
206
+ @media (max-width: 640px) {
207
+ .welcome-hero {
208
+ padding: 2rem 1.35rem;
209
+ }
210
+
211
+ .welcome-title {
212
+ font-size: clamp(2.35rem, 12vw, 3.25rem);
213
+ }
214
+
215
+ .welcome-actions {
216
+ display: grid;
217
+ width: min(100%, 22rem);
218
+ grid-template-columns: 1fr;
219
+ margin-right: auto;
220
+ margin-left: auto;
221
+ }
222
+
223
+ .welcome-button {
224
+ width: 100%;
225
+ }
226
+ }
227
+
228
+ @media (prefers-reduced-motion: reduce) {
229
+ .welcome-button {
230
+ transition: none;
231
+ }
232
+
233
+ .welcome-button:hover {
234
+ transform: none;
235
+ }
236
+ }
237
+ </style>
238
+ <% end %>
239
+
240
+ <main class="welcome-page">
241
+ <section class="welcome-hero" aria-labelledby="welcome-title">
242
+ <div class="welcome-content">
243
+ <div class="welcome-brand">
244
+ <%= customization_instance_logo_tag(
245
+ logo: "app-logo",
246
+ options: { alt: "Lesli", width: 192, height: 79 }
247
+ ) %>
248
+ </div>
249
+
250
+ <p class="welcome-kicker">Open-source SaaS framework</p>
251
+ <h1 class="welcome-title" id="welcome-title">
252
+ Build better business software <span>with Rails.</span>
253
+ </h1>
254
+ <p class="welcome-summary">
255
+ A modular foundation for turning ambitious ideas into scalable, production-ready applications.
256
+ </p>
257
+
258
+ <div class="welcome-actions" aria-label="Learn about Lesli">
259
+ <a class="welcome-button welcome-button--primary" href="https://www.lesli.dev/engines/lesli/start/" target="_blank" rel="noopener noreferrer">
260
+ Build with Lesli
261
+ <span aria-hidden="true">→</span>
262
+ </a>
263
+ <a class="welcome-button welcome-button--secondary" href="https://www.lesli.dev/lesli/" target="_blank" rel="noopener noreferrer">
264
+ Read the docs
265
+ </a>
266
+ </div>
267
+
268
+ <nav class="welcome-access" aria-label="Application access">
269
+ <% unless defined?(LesliShield) %>
270
+ <%= link_to("Open applications", "/apps") unless defined?(LesliDashboard) %>
271
+ <% end %>
272
+ <% if defined?(LesliShield) %>
273
+ <%= link_to("Open applications", "/apps") if user_signed_in? && !defined?(LesliDashboard) %>
274
+ <%= link_to("Open dashboard", "/dashboard") if user_signed_in? && defined?(LesliDashboard) %>
275
+ <%= link_to("Log out", "/logout") if user_signed_in? %>
276
+ <%= link_to("Log in", "/login") unless user_signed_in? %>
277
+ <% end %>
278
+ </nav>
279
+ </div>
280
+ </section>
281
+ </main>
@@ -33,7 +33,7 @@ Building a better future, one line of code at a time.
33
33
  <% protected_controllers = ["confirmations"] %>
34
34
 
35
35
  <% # Get an specific site tracking id or use the development default %>
36
- <% tracking_id = Rails.application.credentials.dig(:providers, :google, :tag_manager) || ENV["PROVIDERS_GOOGLE_TAG_MANAGER"] %>
36
+ <% tracking_id = Rails.application.credentials.dig(:providers, :google, :tag_manager) || ENV["CREDENTIALS_PROVIDERS_GOOGLE_TAG_MANAGER"] %>
37
37
 
38
38
  <% # check if analytics is enabled in the settings file %>
39
39
  <% if Rails.env.production? && tracking_id %>
@@ -32,8 +32,8 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  <%
34
34
  engine_navigation_partial = navigation_partial
35
- dashboard_path = defined?(LesliDashboard) ? lesli_dashboard.root_path : main_app.root_path
36
35
  notifications_count = @lesli&.dig(:notifications).to_i
36
+ dashboard_path = application_dashboard_path
37
37
 
38
38
  header_action_class = "relative flex h-10 w-10 shrink-0 items-center justify-center rounded-xl text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-500/40"
39
39
  logout_action_class = "relative flex h-10 w-10 shrink-0 items-center justify-center rounded-xl text-slate-500 transition-colors hover:bg-red-50 hover:text-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500/30"
data/lib/lesli/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Lesli
2
- VERSION = "5.1.9"
3
- BUILD = "1789351263"
2
+ VERSION = "5.1.11"
3
+ BUILD = "1791607001"
4
4
  end
@@ -37,13 +37,13 @@ namespace :lesli do
37
37
  desc "Drop, create, migrate, seed & configure the Lesli database (development only)"
38
38
  task :rebuild => :environment do |task, args|
39
39
  drop()
40
- create()
41
- migrate()
40
+ prepare()
42
41
  seed()
43
42
  configure()
44
43
  status()
45
44
  end
46
45
 
46
+
47
47
  desc "Migrate, configure && user the Lesli database"
48
48
  task :prepare => :environment do |task, args|
49
49
  prepare()
@@ -77,24 +77,6 @@ namespace :lesli do
77
77
  end
78
78
  end
79
79
 
80
- # Create the Lesli database (development only)
81
- def create
82
-
83
- # print a message to let the users show the action running
84
- Termline.info("Create the Lesli database")
85
-
86
- Rake::Task['db:create'].invoke
87
- end
88
-
89
- # Migrate the Lesli database
90
- def migrate
91
-
92
- # print a message to let the users show the action running
93
- Termline.br
94
- Termline.info("Apply database migrations")
95
- Rake::Task['db:migrate'].invoke
96
- end
97
-
98
80
  # Create the Lesli database (development only)
99
81
  def prepare
100
82
 
data/readme.md CHANGED
@@ -114,7 +114,7 @@ bin/rails lesli:status
114
114
  ```
115
115
 
116
116
  > [!WARNING]
117
- > `bin/rails lesli:db:rebuild` drops, recreates, migrates, and seeds the database. Use it only when you intentionally want to replace the current development data.
117
+ > `bin/rails lesli:db:rebuild` drops the database, deletes `db/schema.rb`, prepares and seeds the database, configures Lesli accounts, and prints the system status. It is blocked in production; use it only when you intentionally want to replace the current development data.
118
118
 
119
119
  ### Start the server
120
120
 
@@ -171,6 +171,7 @@ For additional server configurations, use the standard Rails server options:
171
171
  ```shell
172
172
  bin/rails server --binding=0.0.0.0
173
173
  bin/rails server --environment=development
174
+ RAILS_SERVE_STATIC_FILES=true rails s --environment=production
174
175
  ```
175
176
 
176
177
  <br />
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.9
4
+ version: 5.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
@@ -207,6 +207,7 @@ files:
207
207
  - app/models/concerns/lesli/user_extensions.rb
208
208
  - app/models/lesli/account.rb
209
209
  - app/models/lesli/application_lesli_record.rb
210
+ - app/models/lesli/application_record.rb
210
211
  - app/models/lesli/items/activity.rb
211
212
  - app/models/lesli/items/discussion.rb
212
213
  - app/models/lesli/items/task.rb