kamiliff 0.35.0 → 0.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -10
- data/app/controllers/liff_controller.rb +2 -1
- data/app/views/layouts/liff.html.erb +6 -0
- data/app/views/liff/entry.html.erb +3 -1
- data/lib/kamiliff/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93704a6b7236b15aa43db6024698ba8f5c237cccc52a9108682f8f12af2f3871
|
4
|
+
data.tar.gz: bb3337bb295a39abad7d14f47526f8058ec1517adf9b6e80bc1c5cc3d2a908bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d6a3feb2f075a3bb8bf111f1200cae246a499dcae18a33e52d73f8609de94d0a0d5352f5297f59d7007cb77ee14c72f57ff0d564052f70fa4c97e3b62c776d9
|
7
|
+
data.tar.gz: d55d7eda702e4e2611b5f2ce6a36aa4100ecc5feee3f5a4af1887b310ad2dd7ab25e3264ec0ba4cf93c117ec51e0dbde6abd945022867b14ad56e67b16e61cea
|
data/README.md
CHANGED
@@ -46,22 +46,14 @@ For the [Behaviors from accessing the LIFF URL to opening the LIFF app](https://
|
|
46
46
|
### Set environment variables
|
47
47
|
Create a file `.env` with the following content under the root directory. Kamiliff provides two setting ways, you can choose the one based on the position where LIFF apps added.
|
48
48
|
|
49
|
-
- LIFF apps added to Messaging API channel (v1)
|
50
|
-
```
|
51
|
-
LIFF_COMPACT=line://app/{FOR_COMPACT_LIFF_ID}
|
52
|
-
LIFF_TALL=line://app/{FOR_TALL_LIFF_ID}
|
53
|
-
LIFF_FULL=line://app/{FOR_FULL_LIFF_ID}
|
54
|
-
```
|
55
|
-
|
56
|
-
- LIFF apps added to LINE Login channel (v2)
|
57
49
|
```
|
50
|
+
LINE_LOGIN_CHANNEL_ID={LINE_LOGIN_CHANNEL_ID}
|
51
|
+
LINE_LOGIN_CHANNEL_SECRET={LINE_LOGIN_CHANNEL_SECRET}
|
58
52
|
LIFF_COMPACT=https://liff.line.me/{FOR_COMPACT_LIFF_ID}
|
59
53
|
LIFF_TALL=https://liff.line.me/{FOR_TALL_LIFF_ID}
|
60
54
|
LIFF_FULL=https://liff.line.me/{FOR_FULL_LIFF_ID}
|
61
55
|
```
|
62
56
|
|
63
|
-
You could choose another setting method.
|
64
|
-
|
65
57
|
### Generate simple todo resource
|
66
58
|
Create todo resource:
|
67
59
|
|
@@ -126,7 +126,8 @@ class LiffController < ActionController::Base
|
|
126
126
|
source_user_id: source_user_id,
|
127
127
|
context: context,
|
128
128
|
profile: profile,
|
129
|
-
decoded_id_token: decoded_id_token
|
129
|
+
decoded_id_token: decoded_id_token,
|
130
|
+
language: params["language"]
|
130
131
|
}
|
131
132
|
end
|
132
133
|
|
@@ -17,6 +17,11 @@
|
|
17
17
|
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
+
<% importmap_config_path = Dir.glob("#{Rails.root}/config/importmap.*").first %>
|
21
|
+
<% if importmap_config_path.present? %>
|
22
|
+
<%= javascript_importmap_tags %>
|
23
|
+
<% end %>
|
24
|
+
|
20
25
|
<% has_jquery = [asset_application_js_path, webpacker_application_js_path].compact.map do |path|
|
21
26
|
(File.read(path) =~ /jquery/i).present?
|
22
27
|
end.any? %>
|
@@ -27,6 +32,7 @@
|
|
27
32
|
|
28
33
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
29
34
|
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
35
|
+
|
30
36
|
<script>
|
31
37
|
function liff_send_text_message(text){
|
32
38
|
liff.sendMessages(
|
@@ -49,11 +49,13 @@ let open_liff_page = (function(){
|
|
49
49
|
async function get_liff_data(){
|
50
50
|
const profile = await get_liff_profile();
|
51
51
|
const context = liff.getContext();
|
52
|
+
const language = liff.getLanguage();
|
52
53
|
const idToken = liff.getIDToken();
|
53
54
|
return {
|
54
55
|
context,
|
55
56
|
idToken,
|
56
|
-
profile
|
57
|
+
profile,
|
58
|
+
language
|
57
59
|
}
|
58
60
|
}
|
59
61
|
|
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.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- etrex kuo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,7 +72,7 @@ licenses:
|
|
72
72
|
- MIT
|
73
73
|
metadata:
|
74
74
|
allowed_push_host: https://rubygems.org
|
75
|
-
post_install_message:
|
75
|
+
post_install_message:
|
76
76
|
rdoc_options: []
|
77
77
|
require_paths:
|
78
78
|
- lib
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubygems_version: 3.1.4
|
91
|
-
signing_key:
|
91
|
+
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: An easy way to use LINE Front-end Framework(LIFF) on rails.
|
94
94
|
test_files: []
|