kamiliff 0.31.0 → 0.32.0
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: 36670cc34affa11b01f78976bd3630a7a5cae7061f420a83e4c5a4ae4e49c118
|
4
|
+
data.tar.gz: 439962ffdba9c96506dd942d876c28888d6c49054db21faa7e19454f598c3d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad8417dbe7cdd11be8b7a147887812485ea313994795673479432997f0bd94d2f896c05bde1b30eedd74b7d1157ae92d8d9d7f97327cd45944e4b6472ff49e01
|
7
|
+
data.tar.gz: e89b3b1e26bb1f9ba1d76c388dff2029cd0e344f2187330c8930607401b697c0c093c6e008a84afb60cf96203f94788e01d4b847e2f8828b47dcae77f5cdf5bb
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%
|
2
|
+
messages = [messages] if messages.is_a? Hash
|
3
|
+
messages = messages.to_json if messages.is_a? Array
|
4
|
+
%>
|
5
|
+
|
6
|
+
<script>
|
7
|
+
(function(){
|
8
|
+
async function send_messages(){
|
9
|
+
const messages = <%= raw messages %>;
|
10
|
+
await liff.sendMessages(messages);
|
11
|
+
liff.closeWindow();
|
12
|
+
}
|
13
|
+
|
14
|
+
send_messages();
|
15
|
+
})();
|
16
|
+
</script>
|
@@ -38,8 +38,16 @@ let open_liff_page = (function(){
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
|
41
|
+
async function get_liff_profile(){
|
42
|
+
try{
|
43
|
+
return await liff.getProfile();
|
44
|
+
}catch(error){
|
45
|
+
return {};
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
41
49
|
async function get_liff_data(){
|
42
|
-
const profile = await
|
50
|
+
const profile = await get_liff_profile();
|
43
51
|
const context = liff.getContext();
|
44
52
|
return {
|
45
53
|
profile,
|
data/lib/kamiliff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kamiliff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- etrex kuo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- app/helpers/liff_helper.rb
|
40
40
|
- app/views/layouts/application.liff.erb
|
41
41
|
- app/views/layouts/liff.html.erb
|
42
|
+
- app/views/liff/_send_messages.liff.erb
|
42
43
|
- app/views/liff/_share_target_picker.liff.erb
|
43
44
|
- app/views/liff/entry.html.erb
|
44
45
|
- app/views/liff/route.html.erb
|
@@ -72,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
73
|
- !ruby/object:Gem::Version
|
73
74
|
version: '0'
|
74
75
|
requirements: []
|
75
|
-
rubygems_version: 3.1.
|
76
|
+
rubygems_version: 3.1.4
|
76
77
|
signing_key:
|
77
78
|
specification_version: 4
|
78
79
|
summary: An easy way to use LINE Front-end Framework(LIFF) on rails.
|