appchat 0.0.3 → 0.0.4
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 +4 -4
- data/lib/generators/appchat/appchat_generator.rb +2 -0
- data/lib/generators/appchat/templates/assets/appchat.tailwind.css +62 -0
- data/lib/generators/appchat/templates/messages/_typing_bubbles.html.erb +5 -0
- data/lib/generators/appchat/templates/messages/message.html.erb +5 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f741156bd18664bfb66a4700b633dad255bc2c5e41cacc6b297acbc6d67492b8
|
|
4
|
+
data.tar.gz: d4612a8a1ee88a6caf7bc4e039cf74fa44b369fe79b5d595b0e9544329749819
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0959e29a0ed53649f7f51523e5b4c6f4089b05449f8649165ed7bf7505bdb111774e0c24661e5344f0752df1fa08a38b250a3fe911543530adb7f8a3020f2bd6'
|
|
7
|
+
data.tar.gz: '08f3d14d68ea6c2cf9c50da6842051b78bafa250bf58fc77475e09c32090344d06fe4d98205294aa08e9331bf1817e8d5b23213da001b136dd1fb2101c98aca8'
|
|
@@ -37,6 +37,8 @@ class AppchatGenerator < Rails::Generators::Base
|
|
|
37
37
|
copy_file "messages/index.html.erb", "app/views/messages/index.html.erb", force: true
|
|
38
38
|
copy_file "messages/new.html.erb", "app/views/messages/new.html.erb", force: true
|
|
39
39
|
copy_file "messages/message.html.erb", "app/views/messages/_message.html.erb", force: true
|
|
40
|
+
copy_file "messages/_typing_bubbles.html.erb", "app/views/messages/_typing_bubbles.html.erb", force: true
|
|
41
|
+
copy_file "assets/appchat.tailwind.css", "app/assets/stylesheets/appchat.tailwind.css", force: true
|
|
40
42
|
copy_file "javascript/chat_message_controller.js", "app/javascript/controllers/chat_message_controller.js"
|
|
41
43
|
end
|
|
42
44
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
|
|
9
|
+
.typing {
|
|
10
|
+
background-color: #e0e0e0;
|
|
11
|
+
display: block;
|
|
12
|
+
width: 60px;
|
|
13
|
+
height: 40px;
|
|
14
|
+
border-radius: 20px;
|
|
15
|
+
margin: 0 1rem;
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.circle {
|
|
22
|
+
display: block;
|
|
23
|
+
height: 10px;
|
|
24
|
+
width: 10px;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
background-color: #8d8d8d;
|
|
27
|
+
margin: 3px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.circle.scaling {
|
|
31
|
+
animation: typing 1000ms ease-in-out infinite;
|
|
32
|
+
animation-delay: 3600ms;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.circle:nth-child(1) {
|
|
36
|
+
animation-delay: 0ms;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.circle:nth-child(2) {
|
|
40
|
+
animation-delay: 333ms;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.circle:nth-child(3) {
|
|
44
|
+
animation-delay: 666ms;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@keyframes typing {
|
|
48
|
+
0% {
|
|
49
|
+
transform: scale(1);
|
|
50
|
+
}
|
|
51
|
+
33% {
|
|
52
|
+
transform: scale(1);
|
|
53
|
+
}
|
|
54
|
+
50% {
|
|
55
|
+
transform: scale(1.4);
|
|
56
|
+
}
|
|
57
|
+
100% {
|
|
58
|
+
transform: scale(1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
<div data-chat-message-target="message" id="<%= dom_id(message) %>" class="bg-gray-200 text-gray-900 shadow-lg p-4 rounded-lg">
|
|
2
|
-
|
|
2
|
+
<% if message.content? %>
|
|
3
|
+
<%= message.content %>
|
|
4
|
+
<% else %>
|
|
5
|
+
<%= render 'messages/typing_bubbles' %>
|
|
6
|
+
<% end %>
|
|
3
7
|
</div>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appchat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- hackliteracy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -73,12 +73,14 @@ extensions: []
|
|
|
73
73
|
extra_rdoc_files: []
|
|
74
74
|
files:
|
|
75
75
|
- lib/generators/appchat/appchat_generator.rb
|
|
76
|
+
- lib/generators/appchat/templates/assets/appchat.tailwind.css
|
|
76
77
|
- lib/generators/appchat/templates/chats/chat.html.erb
|
|
77
78
|
- lib/generators/appchat/templates/chats/index.html.erb
|
|
78
79
|
- lib/generators/appchat/templates/chats/show.html.erb
|
|
79
80
|
- lib/generators/appchat/templates/chats_controller.rb
|
|
80
81
|
- lib/generators/appchat/templates/get_ai_response_job.rb
|
|
81
82
|
- lib/generators/appchat/templates/javascript/chat_message_controller.js
|
|
83
|
+
- lib/generators/appchat/templates/messages/_typing_bubbles.html.erb
|
|
82
84
|
- lib/generators/appchat/templates/messages/index.html.erb
|
|
83
85
|
- lib/generators/appchat/templates/messages/message.html.erb
|
|
84
86
|
- lib/generators/appchat/templates/messages/new.html.erb
|
|
@@ -105,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
105
107
|
- !ruby/object:Gem::Version
|
|
106
108
|
version: '0'
|
|
107
109
|
requirements: []
|
|
108
|
-
rubygems_version: 3.5.
|
|
110
|
+
rubygems_version: 3.5.17
|
|
109
111
|
signing_key:
|
|
110
112
|
specification_version: 4
|
|
111
113
|
summary: Appchat makes it easy to add a chat to your app
|