lesli_bell 1.0.1 → 1.1.2

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: 5a4dee8fc902a97c53747e95dae3ae04957ae41537bfd2e51212b641811a5dcc
4
- data.tar.gz: c1c5174fc3597fe9af63c560d16f3eb73abdf33b577a6e7453838ef5dfb0e1d8
3
+ metadata.gz: a77e641c1b3a6cb59f036389ff8f936266305fa7f95068adff945cb95da7e1f7
4
+ data.tar.gz: e7f37aa94d7be4bd29b43cdc73c61ab7017d90a7bd0559c2ab44b93c94e43864
5
5
  SHA512:
6
- metadata.gz: b10b26e3092d91f6df492cb0157f0712c401cefb9867a53bd6f1301a5a2a20aae205782c84bc6823c41aa649d7d6bcc6ea2cea85475edc05b08e9071faeea037
7
- data.tar.gz: 53dbe5510e84c1d43e8b21088d5bec90d0cc74a57916a86d84dc40e60e8f315fdcd4dd074e5544eb2fcf13255eee0fe11eb469cbbdd35912d8f5efe794e2cd49
6
+ metadata.gz: '0682ccc5d63449e496b659352b244eca8785bae27ecb679580c52f880e9850a457b2b8b1c98b173cbee3b8a77187491f7d49d57b7f2fc794e7177a229c1bf1e9'
7
+ data.tar.gz: 727e0dde63a506b1f92a3432c6c55e4230577a19d1879371f45fe95347e3d8e0f8b03152c8287f74f68a8cc1a2fb4947d54e0da026a9d5d204b686084bb0d366
data/Rakefile CHANGED
@@ -1,5 +1,9 @@
1
1
  require "bundler/setup"
2
2
 
3
- load "rails/tasks/statistics.rake"
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
4
5
 
5
6
  require "bundler/gem_tasks"
7
+
8
+ desc "Run engine tests through the dummy Rails application"
9
+ task test: "app:test"
@@ -1,4 +1,476 @@
1
- /*!***********************************************************************************************************************************************************!*\
2
- !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!./node_modules/sass-loader/dist/cjs.js!../LesliBell/lib/scss/application.scss ***!
3
- \***********************************************************************************************************************************************************/
4
-
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --color-sky-50: oklch(97.7% 0.013 236.62);
7
+ --color-sky-100: oklch(95.1% 0.026 236.824);
8
+ --color-sky-200: oklch(90.1% 0.058 230.902);
9
+ --color-sky-500: oklch(68.5% 0.169 237.323);
10
+ --color-sky-700: oklch(50% 0.134 242.749);
11
+ --color-sky-800: oklch(44.3% 0.11 240.79);
12
+ --color-slate-50: oklch(98.4% 0.003 247.858);
13
+ --color-slate-100: oklch(96.8% 0.007 247.896);
14
+ --color-slate-200: oklch(92.9% 0.013 255.508);
15
+ --color-slate-400: oklch(70.4% 0.04 256.788);
16
+ --color-slate-500: oklch(55.4% 0.046 257.417);
17
+ --color-slate-600: oklch(44.6% 0.043 257.281);
18
+ --color-slate-800: oklch(27.9% 0.041 260.031);
19
+ --color-white: #fff;
20
+ --spacing: 0.25rem;
21
+ --text-xs: 0.75rem;
22
+ --text-xs--line-height: calc(1 / 0.75);
23
+ --text-sm: 0.875rem;
24
+ --text-sm--line-height: calc(1.25 / 0.875);
25
+ --text-base: 1rem;
26
+ --text-base--line-height: calc(1.5 / 1);
27
+ --text-lg: 1.125rem;
28
+ --text-lg--line-height: calc(1.75 / 1.125);
29
+ --text-xl: 1.25rem;
30
+ --text-xl--line-height: calc(1.75 / 1.25);
31
+ --font-weight-medium: 500;
32
+ --font-weight-semibold: 600;
33
+ --radius-md: 0.375rem;
34
+ --radius-lg: 0.5rem;
35
+ --radius-2xl: 1rem;
36
+ --default-transition-duration: 150ms;
37
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
38
+ }
39
+ }
40
+ @layer utilities {
41
+ .absolute {
42
+ position: absolute;
43
+ }
44
+ .relative {
45
+ position: relative;
46
+ }
47
+ .inset-y-0 {
48
+ inset-block: 0px;
49
+ }
50
+ .top-3\.5 {
51
+ top: calc(var(--spacing) * 3.5);
52
+ }
53
+ .right-4 {
54
+ right: calc(var(--spacing) * 4);
55
+ }
56
+ .left-0 {
57
+ left: 0px;
58
+ }
59
+ .mt-1 {
60
+ margin-top: var(--spacing);
61
+ }
62
+ .mt-1\.5 {
63
+ margin-top: calc(var(--spacing) * 1.5);
64
+ }
65
+ .line-clamp-2 {
66
+ overflow: hidden;
67
+ display: -webkit-box;
68
+ -webkit-box-orient: vertical;
69
+ -webkit-line-clamp: 2;
70
+ }
71
+ .block {
72
+ display: block;
73
+ }
74
+ .flex {
75
+ display: flex;
76
+ }
77
+ .inline-flex {
78
+ display: inline-flex;
79
+ }
80
+ .size-8 {
81
+ width: calc(var(--spacing) * 8);
82
+ height: calc(var(--spacing) * 8);
83
+ }
84
+ .size-9 {
85
+ width: calc(var(--spacing) * 9);
86
+ height: calc(var(--spacing) * 9);
87
+ }
88
+ .w-1 {
89
+ width: var(--spacing);
90
+ }
91
+ .w-fit {
92
+ width: fit-content;
93
+ }
94
+ .min-w-0 {
95
+ min-width: 0px;
96
+ }
97
+ .flex-1 {
98
+ flex: 1;
99
+ }
100
+ .shrink-0 {
101
+ flex-shrink: 0;
102
+ }
103
+ .flex-wrap {
104
+ flex-wrap: wrap;
105
+ }
106
+ .items-center {
107
+ align-items: center;
108
+ }
109
+ .items-start {
110
+ align-items: flex-start;
111
+ }
112
+ .justify-center {
113
+ justify-content: center;
114
+ }
115
+ .gap-1 {
116
+ gap: var(--spacing);
117
+ }
118
+ .gap-2 {
119
+ gap: calc(var(--spacing) * 2);
120
+ }
121
+ .gap-3 {
122
+ gap: calc(var(--spacing) * 3);
123
+ }
124
+ .gap-x-2 {
125
+ column-gap: calc(var(--spacing) * 2);
126
+ }
127
+ .gap-y-1 {
128
+ row-gap: var(--spacing);
129
+ }
130
+ :where(.divide-y > :not(:last-child)) {
131
+ --tw-divide-y-reverse: 0;
132
+ border-bottom-style: var(--tw-border-style);
133
+ border-top-style: var(--tw-border-style);
134
+ border-top-width: calc(1px * var(--tw-divide-y-reverse));
135
+ border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
136
+ }
137
+ :where(.divide-slate-200 > :not(:last-child)) {
138
+ border-color: var(--color-slate-200);
139
+ }
140
+ .overflow-hidden {
141
+ overflow: hidden;
142
+ }
143
+ .rounded-2xl {
144
+ border-radius: var(--radius-2xl);
145
+ }
146
+ .rounded-full {
147
+ border-radius: calc(infinity * 1px);
148
+ }
149
+ .rounded-lg {
150
+ border-radius: var(--radius-lg);
151
+ }
152
+ .rounded-md {
153
+ border-radius: var(--radius-md);
154
+ }
155
+ .border {
156
+ border-style: var(--tw-border-style);
157
+ border-width: 1px;
158
+ }
159
+ .border-slate-200 {
160
+ border-color: var(--color-slate-200);
161
+ }
162
+ .border-transparent {
163
+ border-color: transparent;
164
+ }
165
+ .bg-danger-50 {
166
+ background-color: var(--lesli-color-danger-50);
167
+ }
168
+ .bg-danger-500 {
169
+ background-color: var(--lesli-color-danger-500);
170
+ }
171
+ .bg-info-50 {
172
+ background-color: var(--lesli-color-info-50);
173
+ }
174
+ .bg-info-500 {
175
+ background-color: var(--lesli-color-info-500);
176
+ }
177
+ .bg-neutral-50 {
178
+ background-color: var(--lesli-color-neutral-50);
179
+ }
180
+ .bg-neutral-400 {
181
+ background-color: var(--lesli-color-neutral-400);
182
+ }
183
+ .bg-sky-50 {
184
+ background-color: var(--color-sky-50);
185
+ }
186
+ .bg-slate-100 {
187
+ background-color: var(--color-slate-100);
188
+ }
189
+ .bg-success-50 {
190
+ background-color: var(--lesli-color-success-50);
191
+ }
192
+ .bg-success-500 {
193
+ background-color: var(--lesli-color-success-500);
194
+ }
195
+ .bg-warning-50 {
196
+ background-color: var(--lesli-color-warning-50);
197
+ }
198
+ .bg-warning-500 {
199
+ background-color: var(--lesli-color-warning-500);
200
+ }
201
+ .bg-white {
202
+ background-color: var(--color-white);
203
+ }
204
+ .px-2 {
205
+ padding-inline: calc(var(--spacing) * 2);
206
+ }
207
+ .px-3 {
208
+ padding-inline: calc(var(--spacing) * 3);
209
+ }
210
+ .px-4 {
211
+ padding-inline: calc(var(--spacing) * 4);
212
+ }
213
+ .py-0\.5 {
214
+ padding-block: calc(var(--spacing) * 0.5);
215
+ }
216
+ .py-1\.5 {
217
+ padding-block: calc(var(--spacing) * 1.5);
218
+ }
219
+ .py-3\.5 {
220
+ padding-block: calc(var(--spacing) * 3.5);
221
+ }
222
+ .pr-14 {
223
+ padding-right: calc(var(--spacing) * 14);
224
+ }
225
+ .text-base {
226
+ font-size: var(--text-base);
227
+ line-height: var(--tw-leading, var(--text-base--line-height));
228
+ }
229
+ .text-lg {
230
+ font-size: var(--text-lg);
231
+ line-height: var(--tw-leading, var(--text-lg--line-height));
232
+ }
233
+ .text-sm {
234
+ font-size: var(--text-sm);
235
+ line-height: var(--tw-leading, var(--text-sm--line-height));
236
+ }
237
+ .text-xl {
238
+ font-size: var(--text-xl);
239
+ line-height: var(--tw-leading, var(--text-xl--line-height));
240
+ }
241
+ .text-xs {
242
+ font-size: var(--text-xs);
243
+ line-height: var(--tw-leading, var(--text-xs--line-height));
244
+ }
245
+ .leading-5 {
246
+ --tw-leading: calc(var(--spacing) * 5);
247
+ line-height: calc(var(--spacing) * 5);
248
+ }
249
+ .leading-none {
250
+ --tw-leading: 1;
251
+ line-height: 1;
252
+ }
253
+ .font-medium {
254
+ --tw-font-weight: var(--font-weight-medium);
255
+ font-weight: var(--font-weight-medium);
256
+ }
257
+ .font-semibold {
258
+ --tw-font-weight: var(--font-weight-semibold);
259
+ font-weight: var(--font-weight-semibold);
260
+ }
261
+ .text-danger-700 {
262
+ color: var(--lesli-color-danger-700);
263
+ }
264
+ .text-info-700 {
265
+ color: var(--lesli-color-info-700);
266
+ }
267
+ .text-neutral-700 {
268
+ color: var(--lesli-color-neutral-700);
269
+ }
270
+ .text-sky-700 {
271
+ color: var(--color-sky-700);
272
+ }
273
+ .text-slate-400 {
274
+ color: var(--color-slate-400);
275
+ }
276
+ .text-slate-500 {
277
+ color: var(--color-slate-500);
278
+ }
279
+ .text-slate-600 {
280
+ color: var(--color-slate-600);
281
+ }
282
+ .text-slate-800 {
283
+ color: var(--color-slate-800);
284
+ }
285
+ .text-success-700 {
286
+ color: var(--lesli-color-success-700);
287
+ }
288
+ .text-warning-700 {
289
+ color: var(--lesli-color-warning-700);
290
+ }
291
+ .shadow-sm {
292
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
293
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
294
+ }
295
+ .ring-1 {
296
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
297
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
298
+ }
299
+ .ring-danger-200 {
300
+ --tw-ring-color: var(--lesli-color-danger-200);
301
+ }
302
+ .ring-sky-200 {
303
+ --tw-ring-color: var(--color-sky-200);
304
+ }
305
+ .ring-warning-200 {
306
+ --tw-ring-color: var(--lesli-color-warning-200);
307
+ }
308
+ .transition-colors {
309
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
310
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
311
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
312
+ }
313
+ .ring-inset {
314
+ --tw-ring-inset: inset;
315
+ }
316
+ @media (hover: hover) {
317
+ .hover\:bg-sky-100:hover {
318
+ background-color: var(--color-sky-100);
319
+ }
320
+ .hover\:bg-slate-50:hover {
321
+ background-color: var(--color-slate-50);
322
+ }
323
+ .hover\:text-sky-700:hover {
324
+ color: var(--color-sky-700);
325
+ }
326
+ .hover\:text-sky-800:hover {
327
+ color: var(--color-sky-800);
328
+ }
329
+ }
330
+ .focus-visible\:ring-2:focus-visible {
331
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
332
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
333
+ }
334
+ .focus-visible\:ring-sky-500\/30:focus-visible {
335
+ --tw-ring-color: color-mix(in srgb, oklch(68.5% 0.169 237.323) 30%, transparent);
336
+ @supports (color: color-mix(in lab, red, red)) {
337
+ --tw-ring-color: color-mix(in oklab, var(--color-sky-500) 30%, transparent);
338
+ }
339
+ }
340
+ .focus-visible\:ring-offset-2:focus-visible {
341
+ --tw-ring-offset-width: 2px;
342
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
343
+ }
344
+ .focus-visible\:outline-none:focus-visible {
345
+ --tw-outline-style: none;
346
+ outline-style: none;
347
+ }
348
+ @media (width >= 40rem) {
349
+ .sm\:top-4 {
350
+ top: calc(var(--spacing) * 4);
351
+ }
352
+ .sm\:right-5 {
353
+ right: calc(var(--spacing) * 5);
354
+ }
355
+ .sm\:px-5 {
356
+ padding-inline: calc(var(--spacing) * 5);
357
+ }
358
+ .sm\:py-4 {
359
+ padding-block: calc(var(--spacing) * 4);
360
+ }
361
+ .sm\:pr-16 {
362
+ padding-right: calc(var(--spacing) * 16);
363
+ }
364
+ .sm\:text-base {
365
+ font-size: var(--text-base);
366
+ line-height: var(--tw-leading, var(--text-base--line-height));
367
+ }
368
+ }
369
+ }
370
+ @property --tw-divide-y-reverse {
371
+ syntax: "*";
372
+ inherits: false;
373
+ initial-value: 0;
374
+ }
375
+ @property --tw-border-style {
376
+ syntax: "*";
377
+ inherits: false;
378
+ initial-value: solid;
379
+ }
380
+ @property --tw-leading {
381
+ syntax: "*";
382
+ inherits: false;
383
+ }
384
+ @property --tw-font-weight {
385
+ syntax: "*";
386
+ inherits: false;
387
+ }
388
+ @property --tw-shadow {
389
+ syntax: "*";
390
+ inherits: false;
391
+ initial-value: 0 0 #0000;
392
+ }
393
+ @property --tw-shadow-color {
394
+ syntax: "*";
395
+ inherits: false;
396
+ }
397
+ @property --tw-shadow-alpha {
398
+ syntax: "<percentage>";
399
+ inherits: false;
400
+ initial-value: 100%;
401
+ }
402
+ @property --tw-inset-shadow {
403
+ syntax: "*";
404
+ inherits: false;
405
+ initial-value: 0 0 #0000;
406
+ }
407
+ @property --tw-inset-shadow-color {
408
+ syntax: "*";
409
+ inherits: false;
410
+ }
411
+ @property --tw-inset-shadow-alpha {
412
+ syntax: "<percentage>";
413
+ inherits: false;
414
+ initial-value: 100%;
415
+ }
416
+ @property --tw-ring-color {
417
+ syntax: "*";
418
+ inherits: false;
419
+ }
420
+ @property --tw-ring-shadow {
421
+ syntax: "*";
422
+ inherits: false;
423
+ initial-value: 0 0 #0000;
424
+ }
425
+ @property --tw-inset-ring-color {
426
+ syntax: "*";
427
+ inherits: false;
428
+ }
429
+ @property --tw-inset-ring-shadow {
430
+ syntax: "*";
431
+ inherits: false;
432
+ initial-value: 0 0 #0000;
433
+ }
434
+ @property --tw-ring-inset {
435
+ syntax: "*";
436
+ inherits: false;
437
+ }
438
+ @property --tw-ring-offset-width {
439
+ syntax: "<length>";
440
+ inherits: false;
441
+ initial-value: 0px;
442
+ }
443
+ @property --tw-ring-offset-color {
444
+ syntax: "*";
445
+ inherits: false;
446
+ initial-value: #fff;
447
+ }
448
+ @property --tw-ring-offset-shadow {
449
+ syntax: "*";
450
+ inherits: false;
451
+ initial-value: 0 0 #0000;
452
+ }
453
+ @layer properties {
454
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
455
+ *, ::before, ::after, ::backdrop {
456
+ --tw-divide-y-reverse: 0;
457
+ --tw-border-style: solid;
458
+ --tw-leading: initial;
459
+ --tw-font-weight: initial;
460
+ --tw-shadow: 0 0 #0000;
461
+ --tw-shadow-color: initial;
462
+ --tw-shadow-alpha: 100%;
463
+ --tw-inset-shadow: 0 0 #0000;
464
+ --tw-inset-shadow-color: initial;
465
+ --tw-inset-shadow-alpha: 100%;
466
+ --tw-ring-color: initial;
467
+ --tw-ring-shadow: 0 0 #0000;
468
+ --tw-inset-ring-color: initial;
469
+ --tw-inset-ring-shadow: 0 0 #0000;
470
+ --tw-ring-inset: initial;
471
+ --tw-ring-offset-width: 0px;
472
+ --tw-ring-offset-color: #fff;
473
+ --tw-ring-offset-shadow: 0 0 #0000;
474
+ }
475
+ }
476
+ }
@@ -37,6 +37,12 @@ module LesliBell
37
37
  render :index
38
38
  end
39
39
 
40
+ # PUT /notifications/mark_all_as_read
41
+ def mark_all_as_read
42
+ NotificationService.new(current_user).read_all
43
+ redirect_to notifications_path, status: :see_other
44
+ end
45
+
40
46
  # DELETE /notifications/1
41
47
  def destroy
42
48
  @notification.destroy
@@ -1,6 +1,9 @@
1
1
  module LesliBell
2
2
  class Account < ApplicationRecord
3
- belongs_to :account, class_name: "::Lesli::Account"
3
+ belongs_to :account,
4
+ class_name: "Lesli::Account",
5
+ inverse_of: :bell
6
+ validates :account_id, uniqueness: true
4
7
  has_many :notifications
5
8
  has_many :announcements
6
9
  end
@@ -1,6 +1,6 @@
1
1
  module LesliBell
2
2
  class Announcement::User < ApplicationRecord
3
- belongs_to :announcement #, class_name: "CloudBell::Announcement", foreign_key: "cloud_bell_announcements_id", optional: false
4
- #belongs_to :user, class_name: "Lesli::User", foreign_key: "users_id"
3
+ belongs_to :announcement
4
+ belongs_to :user, class_name: "::Lesli::User"
5
5
  end
6
6
  end
@@ -78,5 +78,13 @@ module LesliBell
78
78
  noti.update(:status => :read)
79
79
  self
80
80
  end
81
+
82
+ def read_all
83
+ current_user.account.bell.notifications
84
+ .where(user: current_user, status: ["created", "sent", nil])
85
+ .update_all(status: "read", updated_at: Time.current)
86
+
87
+ self
88
+ end
81
89
  end
82
90
  end
@@ -30,4 +30,4 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  %>
32
32
 
33
- <%= render("/lesli/shared/dashboards/show") %>
33
+ <%= render(template:"lesli/shared/dashboards/show") %>