nuntius 1.3.4 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/nuntius/admin/layouts_controller.rb +3 -1
- data/app/views/nuntius/admin/campaigns/edit.html.slim +2 -0
- data/app/views/nuntius/admin/layouts/edit.html.slim +19 -1
- data/app/views/nuntius/admin/templates/edit.html.slim +9 -5
- data/config/locales/en.yml +1 -0
- data/config/locales/nl.yml +2 -0
- data/lib/nuntius/version.rb +1 -1
- metadata +2 -5
- data/app/views/nuntius/admin/layouts/attachments/_attachments.html.slim +0 -28
- data/app/views/nuntius/admin/layouts/attachments/_index.html.slim +0 -2
- data/app/views/nuntius/admin/layouts/attachments/create.json.jbuilder +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11b30e0625c1b47a70a22803a0bdec45d92faf881b1e83ae72e00582d95b36f4
|
4
|
+
data.tar.gz: ec9251af770d4b3cd4ae58b75968bddc4e4917dc1ba01d8073eb73df56c9fe4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8dd4831dcbb7c4e8440e4a1ebf281a712959de7a47323e2590a24d71bf039c5a7c7b5899e3427832949a061f1bed2ac72b3f70acdc86b534aafe16f7d364689
|
7
|
+
data.tar.gz: 1c5e6ad9964622533dad4c91df0ff7bcdf05299bbaddcdf81efcfee6eeea02f9b50bc7ad662b174e8433e422d040dda57b8e9f627fd2c8360cc27575653735c8
|
@@ -43,7 +43,9 @@ module Nuntius
|
|
43
43
|
private
|
44
44
|
|
45
45
|
def layout_params
|
46
|
-
|
46
|
+
permitted = %i[name data metadata_yaml]
|
47
|
+
permitted += [attachments: []] if params[:layout][:attachments].compact_blank.present?
|
48
|
+
params.require(:layout).permit(permitted)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
= sts.form_for([:admin, @layout]) do |f|
|
2
2
|
= sts.card :nuntius_admin_layouts, icon: 'fal fa-table-layout' do |card|
|
3
|
+
- card.with_action
|
4
|
+
= f.continue
|
3
5
|
- card.with_action
|
4
6
|
= f.submit
|
5
7
|
|
@@ -17,7 +19,23 @@
|
|
17
19
|
|
18
20
|
- if @layout.persisted?
|
19
21
|
- card.with_tab:media, padding: true
|
20
|
-
|
22
|
+
.grid.grid-cols-4.gap-4
|
23
|
+
.col-span-4
|
24
|
+
= f.input :attachments, as: :file, multiple: true
|
25
|
+
ul.col-span-4
|
26
|
+
- @layout.attachments.each do |attachment|
|
27
|
+
li.col-span-1
|
28
|
+
- if attachment.previewable?
|
29
|
+
= image_tag attachment.preview(resize_to_limit: [500, 500]).url, class: 'object-cover pointer-events-none'
|
30
|
+
- elsif attachment.image?
|
31
|
+
= image_tag main_app.url_for(attachment.variant(resize_to_limit: [500, 500])), class: 'object-cover pointer-events-none'
|
32
|
+
= (attachment.blob.byte_size / 1048576.0).round(2)
|
33
|
+
' MB
|
34
|
+
= link_to admin_layout_attachment_path(@layout, attachment.id), data: { controller: 'attachment-delete', 'action': 'attachment-delete#delete' } do
|
35
|
+
i.fal.fa-xmark
|
36
|
+
=< link_to(main_app.rails_blob_path(attachment, disposition: 'attachment'),
|
37
|
+
title: attachment.filename)
|
38
|
+
i.fal.fa-download
|
21
39
|
|
22
40
|
- if @layout.templates.exists?
|
23
41
|
- card.with_tab :templates, padding: false
|
@@ -55,16 +55,16 @@
|
|
55
55
|
.col-span-12
|
56
56
|
= f.association :layout, collection: @layouts, include_blank: true
|
57
57
|
.col-span-12
|
58
|
-
= f.input :html, as: :editor, mode: 'text/markdown'
|
58
|
+
= f.input :html, as: :editor, mode: 'text/markdown', height: '400px'
|
59
59
|
|
60
60
|
template data-toggle-target='toggleable' data-toggle-value='voice'
|
61
61
|
.col-span-12
|
62
|
-
= f.input :text, as: :editor, mode: 'text/plain'
|
62
|
+
= f.input :text, as: :editor, mode: 'text/plain', height: '400px'
|
63
63
|
template data-toggle-target='toggleable' data-toggle-value='slack'
|
64
64
|
.col-span-12
|
65
|
-
= f.input :text, as: :editor, mode: 'text/plain'
|
65
|
+
= f.input :text, as: :editor, mode: 'text/plain', height: '400px'
|
66
66
|
.col-span-12
|
67
|
-
= f.input :payload, as: :editor, mode: 'application/yaml', hint: 'See here for more information: https://app.slack.com/block-kit-builder/'
|
67
|
+
= f.input :payload, as: :editor, mode: 'application/yaml', hint: 'See here for more information: https://app.slack.com/block-kit-builder/', height: '400px'
|
68
68
|
|
69
69
|
template data-toggle-target='toggleable' data-toggle-value='sms'
|
70
70
|
.col-span-12
|
@@ -72,7 +72,11 @@
|
|
72
72
|
template data-toggle-target='toggleable' data-toggle-value='push'
|
73
73
|
.col-span-12
|
74
74
|
= f.input :text, as: :editor, mode: 'text/plain'
|
75
|
-
template data-toggle-target='toggleable' data-toggle-value='
|
75
|
+
template data-toggle-target='toggleable' data-toggle-value='teams'
|
76
|
+
.col-span-12
|
77
|
+
= f.input :text, as: :editor, mode: 'text/plain', height: '400px'
|
78
|
+
.col-span-12
|
79
|
+
= f.input :payload, as: :editor, mode: 'application/yaml', hint: 'See here for more information: https://www.adaptivecards.io/designer/', height: '400px'
|
76
80
|
|
77
81
|
|
78
82
|
- if @template.messages.exists?
|
data/config/locales/en.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/lib/nuntius/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nuntius
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apnotic
|
@@ -514,9 +514,6 @@ files:
|
|
514
514
|
- app/validators/liquid_validator.rb
|
515
515
|
- app/views/nuntius/admin/campaigns/edit.html.slim
|
516
516
|
- app/views/nuntius/admin/campaigns/index.html.slim
|
517
|
-
- app/views/nuntius/admin/layouts/attachments/_attachments.html.slim
|
518
|
-
- app/views/nuntius/admin/layouts/attachments/_index.html.slim
|
519
|
-
- app/views/nuntius/admin/layouts/attachments/create.json.jbuilder
|
520
517
|
- app/views/nuntius/admin/layouts/edit.html.slim
|
521
518
|
- app/views/nuntius/admin/layouts/index.html.slim
|
522
519
|
- app/views/nuntius/admin/lists/edit.html.slim
|
@@ -1,28 +0,0 @@
|
|
1
|
-
- attachments.each do |attachment|
|
2
|
-
li.relative
|
3
|
-
/! Current: "ring-2 ring-offset-2 ring-indigo-500", Default: "focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-gray-100 focus-within:ring-indigo-500"
|
4
|
-
.group.block.w-full.aspect-w-10.aspect-h-7.rounded-lg.bg-gray-100.overflow-hidden
|
5
|
-
/! Current: "", Default: "group-hover:opacity-75"
|
6
|
-
- if attachment.previewable?
|
7
|
-
= image_tag attachment.preview(resize_to_limit: [500, 500]).url, class: 'object-cover pointer-events-none'
|
8
|
-
- elsif attachment.image?
|
9
|
-
= image_tag main_app.url_for(attachment.variant(resize_to_limit: [500, 500])), class: 'object-cover pointer-events-none'
|
10
|
-
p.mt-2.block.text-sm.font-medium.text-gray-900.truncate.pointer-events-none = attachment.filename
|
11
|
-
p.block.text-sm.font-medium.text-gray-500
|
12
|
-
= (attachment.blob.byte_size / 1048576.0).round(2)
|
13
|
-
' MB
|
14
|
-
= link_to admin_layout_attachment_path(@layout, attachment.id), data: { controller: 'attachment-delete', 'action': 'attachment-delete#delete' } do
|
15
|
-
i.fal.fa-xmark
|
16
|
-
=< link_to(main_app.rails_blob_path(attachment, disposition: 'attachment'),
|
17
|
-
title: attachment.filename)
|
18
|
-
i.fal.fa-download
|
19
|
-
|
20
|
-
/ This controller comes from papyrus
|
21
|
-
li.relative.attachment-upload data-controller="attachment-upload" data-attachment-upload-url="#{upload_url}" data-attachment-upload-param-name="attachments[]" data-attachment-upload-extra-data='{}'
|
22
|
-
.group.block.w-full.aspect-w-10.aspect-h-7.rounded-lg.bg-gray-100.overflow-hidden.text-center.align-middle style="height: 200px;"
|
23
|
-
span.icon.upload
|
24
|
-
i.fal.fa-4x.fa-upload.pt-16
|
25
|
-
span.icon.uploading
|
26
|
-
i.fal.fa-4x.fa-circle-notch.fa-spin.pt-16
|
27
|
-
|
28
|
-
p.mt-2.block.text-sm.font-medium.text-gray-500.truncate.pointer-events-none Drag or click to attach files
|
@@ -1,2 +0,0 @@
|
|
1
|
-
ul.attachments.grid.grid-cols-2.gap-x-4.gap-y-8.sm:grid-cols-3.sm:gap-x-6.md:grid-cols-4.lg:grid-cols-3.xl:grid-cols-4.xl:gap-x-8 role="list"
|
2
|
-
= render partial: 'nuntius/admin/layouts/attachments/attachments', locals: { attachments: @layout.attachments, upload_url: admin_layout_attachments_path(@layout) }
|