satis 2.1.54 → 2.1.55
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89a9eff8bce58f2865827f0459ec2f8e05da5e6d46ea97fb8a56e56740cb5a0c
|
4
|
+
data.tar.gz: 7ea00bb6b3abf1b5e095f1ce92a58f5e400bc5571894992aa2ab06650af5feba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27c4dd12d202d26da9a3537fc20a8f94bf19cc9d1f7a7aec2fe2c0d40a7550d9bc2c0325d212713c3301364a958ff80d9a345a0732eff8e4a09afe853f26054f
|
7
|
+
data.tar.gz: bcd8a0c9175f95c3d435d97cfcc0dffe3bba46486854e13cd866883b6695d151cac0f529f33ab276429e6d84ef0754d86b91885b227dcace95d3c4d3650f4522
|
@@ -1,8 +1,8 @@
|
|
1
1
|
div data-controller="satis-signature" data-satis-signature-url-value=(form.object.send(attribute).attached? ? helpers.main_app.url_for(form.object.send(attribute)) : nil)
|
2
|
-
canvas.border-solid.border.rounded-md data-satis-signature-target="canvas" data-satis-signature-action="change->satis-signature#update" width=
|
2
|
+
canvas.border-solid.border.rounded-md data-satis-signature-target="canvas" data-satis-signature-action="change->satis-signature#update" width=(options[:width] || 400) height=(options[:height] || 200)
|
3
3
|
.button
|
4
4
|
i.fal.fa-trash data-action='click->satis-signature#clear' class='cursor-pointer'
|
5
5
|
|<
|
6
6
|
.button
|
7
7
|
i.fal.fa-undo data-action='click->satis-signature#undo' class='cursor-pointer'
|
8
|
-
= form.file_field
|
8
|
+
= form.file_field attribute, data: { "satis-signature-target" => 'file' }, class: 'hidden'
|
@@ -1,13 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Add this to your application.rb
|
4
|
+
# ActiveStorage::Engine.config.active_storage.content_types_to_serve_as_binary.delete("image/svg+xml")
|
3
5
|
module Satis
|
4
6
|
module Signature
|
5
7
|
class Component < ViewComponent::Base
|
6
|
-
attr_reader :url, :form, :attribute, :
|
8
|
+
attr_reader :url, :form, :attribute, :options
|
7
9
|
|
8
10
|
def initialize(form:, attribute:, **options, &block)
|
9
11
|
@form = form
|
10
12
|
@attribute = attribute
|
13
|
+
@options = options
|
11
14
|
end
|
12
15
|
end
|
13
16
|
end
|
@@ -12,7 +12,6 @@ export default class SignatureComponentController extends ApplicationController
|
|
12
12
|
let blob = await fetch(this.urlValue)
|
13
13
|
.then(r => r.blob())
|
14
14
|
|
15
|
-
|
16
15
|
let dataUrl = await new Promise(resolve => {
|
17
16
|
let reader = new FileReader()
|
18
17
|
reader.onload = () => resolve(reader.result)
|
data/lib/satis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.55
|
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: 2025-02-
|
11
|
+
date: 2025-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser
|