bullet_train-themes-light 1.0.9 → 1.0.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6319d0a14763af6784aae429d04e2adbedc261ad25cccb6e255864fc0219e412
4
- data.tar.gz: d6c27d3b3fcdfb1e45e96a5baaa69e1291091cac63d847b8aec2dd52651af6b2
3
+ metadata.gz: 96f779182e8373c6020cb89424e06e6ff4668995a4136b20fc5a350410464774
4
+ data.tar.gz: 374ce6de5236b4e9b8c1dde2ed22ea553984a334e60955b1f1a86d150b2dc4ac
5
5
  SHA512:
6
- metadata.gz: cef594c6784fc3b3e9b94e79829747c9b73b9c212eb67ac2b3f78348344cf6682f36805fd05900894d11b13d91b65947d889ede570f6d91907a0c02b771e953b
7
- data.tar.gz: ab251d455f6141bb5d1b84849d6da3185737b246ce96d9384f938780974dd5414d4fe009e8b5fcf2ad11f667730908e2c7e63d6a20af035ebbd83edb02b513fa
6
+ metadata.gz: 5ac02d1e6a3eb567ceaf8171349196aca74012a4418f4dd18fb2f0e3cb1002954d7938b8a5223f4ff96e2463e2163d2ea1020de0957849cfa7f020551346e8ac
7
+ data.tar.gz: 1585dd612e3d0b56543afd41a84e50fe2f06235ca3a1bc8c9bdbad1dd901f14e04ad31b75d029c5680e99f41e7d674887544069a652f949589e92206c6b23ce5
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2022 Andrew Culver
1
+ Copyright 2022 Bullet Train, Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,3 +1,10 @@
1
+ .select2-container--default {
2
+ .select2-selection--single,
3
+ .select2-selection--multiple {
4
+ @apply border-gray-300;
5
+ }
6
+ }
7
+
1
8
  .select2-selection.select2-selection--single {
2
9
  min-height: 37px;
3
10
  .select2-selection__rendered {
@@ -147,8 +147,8 @@
147
147
  }
148
148
 
149
149
  .select2-selection--multiple, .select2-selection--single {
150
- @apply bg-sealBlue-300 focus:ring-blue !important;
151
- @apply text-sealBlue-900 border-sealBlue-100;
150
+ @apply bg-sealBlue-300 focus:ring-blue border-sealBlue-100 !important;
151
+ @apply text-sealBlue-900;
152
152
  }
153
153
 
154
154
  /* For the selected options in the multiple select2 component */
@@ -0,0 +1,21 @@
1
+ <% conversation ||= subscription.conversation %>
2
+
3
+ <div class="<%= 'border-l-blue border-l-4 border-blue-700' if subscription.unread? %>">
4
+
5
+ <%= link_to [:account, current_user, :conversations, :subscriptions, conversation_id: subscription.conversation.id], class: "#{current_conversation ? 'bg-gray-100 border-l ' : 'bg-white'} h-28 p-1 flex border-b-2 cursor-pointer hover:no-underline hover:bg-gray-50 relative items-center" do %>
6
+ <div class="md:w-1/4 w-1/5 lg:inline-block md:hidden flex-shrink-0">
7
+ <img src="<%= membership_profile_photo_url(conversation.last_message&.membership || current_membership) %>" title="<%= current_membership.name %>" alt="<%= current_membership.name %>" class="md:w-14 md:h-14 w-12 h-12 rounded-full mx-auto border-1 border-white border-2 flex-none">
8
+ </div>
9
+ <div class="w-4/5 md:w-full lg:w-4/5 pl-4 pr-1 flex-initial truncate">
10
+ <p class="text-xs text-gray-300 text-right hover:no-underline"><%= "#{time_ago_in_words conversation.last_message.created_at} ago" unless conversation.last_message.nil? %></p>
11
+ <h2 class="<%= subscription.unread? ? 'font-bold text-gray-800' : 'font-semibold text-gray-600' %> "><%= conversation.subject&.label_string %></h2>
12
+ <div class="text-gray-300">
13
+ <%= conversation.last_message&.user&.label_string %>
14
+ </div>
15
+ <div class="h-8 text-gray-400 text-sm pt-1 hover:no-underline truncate">
16
+ <%= Nokogiri::HTML.fragment(conversation.last_message.body).text unless conversation.last_message.nil? %>
17
+ </div>
18
+ </div>
19
+
20
+ <% end %>
21
+ </div>
@@ -0,0 +1,26 @@
1
+ <% new_message ||= false %>
2
+ <% current_user_message = message.membership.user == current_user %>
3
+ <% avatar = capture do %>
4
+ <img src="<%= membership_profile_photo_url(message.membership) %>" title="<%= message.membership.name %>" alt="<%= message.membership.name %>" class="w-10 h-10 rounded-full <%= current_user_message ? 'order-2' : 'order-1' %>">
5
+ <% end %>
6
+
7
+ <div class="flex py-3 px-2 text-gray-700 <%= message.reply? ? 'border w-full bg-gray-50 rounded-md' : 'border-b' %> <%= 'opacity-30' if new_message %>">
8
+ <div class="mr-3 min-w-max"><%= avatar %></div>
9
+ <div class="flex flex-col w-full">
10
+ <div class=""><span class="uppercase font-bold text-gray-500"><%= message.user.name %></span><span class="font-extralight text-xs text-gray-400"> &bull; <%= time_ago_in_words message.created_at %> ago</span></div>
11
+ <div class="py-2"><%= trix_sanitize message.body %></div>
12
+ <% if message.replies.any? %>
13
+ <div class="space-y-2 mt-2 mb-2">
14
+ <% message.replies.oldest.each do |reply| %>
15
+ <%= render 'account/shared/comment', message: reply %>
16
+ <% end %>
17
+ </div>
18
+ <% end %>
19
+ <% unless message.reply? %>
20
+ <%= turbo_frame_tag "reply_#{message.id}" do %>
21
+ <%= link_to "Reply", [:reply, :account, message], class: "font-light text-sm text-gray-400 hover:text-gray-500 pt-2" %>
22
+ <% end %>
23
+ <% end %>
24
+ </div>
25
+
26
+ </div>
@@ -0,0 +1,127 @@
1
+ <% new_message ||= false %>
2
+ <% current_user_message = message.membership.user == current_user %>
3
+ <% avatar = capture do %>
4
+ <img src="<%= membership_profile_photo_url(message.membership) %>" title="<%= message.membership.name %>" alt="<%= message.membership.name %>" class="w-6 h-6 rounded-full <%= current_user_message ? 'order-2' : 'order-1' %>">
5
+ <% end %>
6
+ <% next_message ||= message.next_message %>
7
+
8
+ <%# A message series is a series of messages by the same user, each message within 5 minutes of the previous message. It has nothing to do with replies and message threads %>
9
+ <% next_message_in_series = (message.user == next_message&.user) && (message.created_at > next_message.created_at - 5.minutes) && (message.parent_message_id == next_message&.parent_message_id || message.id == next_message.parent_message_id)%>
10
+ <% if next_message_in_series %>
11
+ <% avatar = nil %>
12
+ <% end %>
13
+
14
+ <%# We set this to true when rendering the messages for the reply view. All messages in the thread are shown in order without any other messages from the conversation %>
15
+ <% show_as_thread ||= false %>
16
+
17
+ <%# placeholder messages are used when displaying a reply to a message that we need to show out of order with the rest %>
18
+ <% placeholder_message ||= false %>
19
+
20
+ <% if avatar.nil? %>
21
+ <% avatar = capture do %>
22
+ <div style="height: 24px; width: 24px;" class="<%= current_user_message ? 'order-2' : 'order-1' %>"></div>
23
+ <% end %>
24
+ <% end %>
25
+
26
+ <% rounding_modifier = message_corner_class(next_message_in_series, current_user_message) %>
27
+
28
+ <% timestamp = next_message_in_series || show_as_thread ? '' : time_ago_in_words(message.created_at) + " ago" %>
29
+
30
+ <% threaded_message = message.threaded? %>
31
+ <% thread_started_by_current_user = message.thread_origin_user == current_user %>
32
+ <% last_message_in_thread = !placeholder_message && threaded_message && (message.next_message.nil? || message.next_message.thread_id != message.thread_id)%>
33
+ <% out_of_thread_message = !show_as_thread && threaded_message && message.reply? && message.previous_message != message.previous_message_in_thread %>
34
+ <% has_replies = message.replies.any? && message.next_message == message.next_message_in_thread %>
35
+ <% border_side = thread_started_by_current_user ? :left : :right %>
36
+ <% show_borders = !show_as_thread && threaded_message %>
37
+
38
+ <% if out_of_thread_message %>
39
+ <%= render 'account/shared/message', message: message.thread_origin_message, next_message: message, placeholder_message: true, show_as_thread: show_as_thread %>
40
+ <% end %>
41
+
42
+
43
+ <div class="chat-message"
44
+ <% unless show_as_thread %>
45
+ data-reply-target="message"
46
+ data-user="<%= message.membership.label_string %>"
47
+ data-message-id="<%= message.parent_message_id || message.id %>"
48
+ data-action="mouseleave->reply#hideReplyButton"
49
+ <% end %>
50
+ >
51
+ <div class="group flex <%= 'justify-end' if current_user_message %> <%= 'opacity-20' if new_message %> items-stretch">
52
+ <% if show_borders %>
53
+ <% if (has_replies || placeholder_message) %>
54
+ <%= message_thread_border(side: border_side, position: :start) unless show_as_thread %>
55
+ <% end %>
56
+ <% if message.reply? && ((current_user_message && thread_started_by_current_user) || (!current_user_message && !thread_started_by_current_user) ) %>
57
+ <%= message_thread_border(side: border_side, position: (last_message_in_thread ? :end : :middle)) %>
58
+ <% end %>
59
+ <% end %>
60
+
61
+
62
+ <div class="flex flex-col <%= 'mb-0.5' if next_message_in_series %>">
63
+ <div class="flex items-end relative <%= 'justify-end' if current_user_message %>" data-action="<%= 'click->reply#preventDefault' if show_as_thread %>">
64
+ <div class="flex flex-col space-y-2 text-xs max-w-xs mx-2 <%= current_user_message ? 'order-1 items-end' : 'order-3 items-start' %> z-10 transition-all duration-300"
65
+ data-action="<%= 'mouseenter->reply#showReplyButton click->reply#showReplyButton' unless placeholder_message || show_as_thread %>" data-show-class="<%= current_user_message ? 'mr-10' : 'ml-10' %>"
66
+ >
67
+ <% if placeholder_message %>
68
+ <div class="cursor-pointer" data-thread-url="<%= url_for([:thread, :account, message.thread_origin_message || message]) %>" data-action="click->reply#reply"><span class="px-2 py-1 text-xs text-gray-300 rounded-lg inline-block <%= rounding_modifier %> border-blue-300 border break-words sm:max-w-sm max-w-tiny"><%= Nokogiri::HTML.fragment(trix_sanitize(message.body)).text.truncate(80) %></span></div>
69
+ <% else %>
70
+ <div><span class="px-4 py-2 rounded-lg inline-block <%= rounding_modifier %> <%= current_user_message ? ' bg-blue-600 text-white' : ' bg-gray-300 text-gray-600' %> "><%= trix_sanitize(message.body) %></span></div>
71
+ <% end %>
72
+ </div>
73
+ <%= avatar %>
74
+ <% unless placeholder_message || show_as_thread %>
75
+ <div class="order-2 absolute text-gray-400 bottom-1 hover:text-gray-500 <%= current_user_message ? 'right-10' : 'left-10' %> z-0">
76
+ <button
77
+ data-action="click->reply#reply"
78
+ data-thread-url="<%= url_for([:thread, :account, message.thread_origin_message || message]) %>"
79
+ >
80
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 stroke-current" fill="none" viewBox="0 0 24 24">
81
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" />
82
+ </svg>
83
+ </button>
84
+ </div>
85
+ <% end %>
86
+ </div>
87
+ <% if message.replies.any? && !show_as_thread %>
88
+ <div class="<%= 'text-right' if current_user_message %>">
89
+ <button class="text-xs text-blue-400 text-right mr-12 ml-12" data-thread-url="<%= url_for([:thread, :account, message.thread_origin_message || message]) %>" data-action="reply#reply"><%= message.replies.size %> <%= t("conversations/messages.navigation.reply").pluralize(message.replies.size) %></button>
90
+ </div>
91
+ <% end %>
92
+
93
+ </div>
94
+ </div>
95
+ <% unless next_message_in_series || placeholder_message %>
96
+ <div class="flex">
97
+ <% if show_borders && !last_message_in_thread %>
98
+ <% if (thread_started_by_current_user && current_user_message) || (!thread_started_by_current_user && !current_user_message) %>
99
+ <%= message_thread_border(side: border_side, position: :middle) %>
100
+ <% end %>
101
+ <% end %>
102
+
103
+ <div class="flex flex-grow order-1 <%= current_user_message ? 'justify-end items-end pr-8' : 'justify-start items-start pl-8' %> <%= 'mb-3' unless next_message_in_series %>">
104
+ <div class="<%= show_as_thread ? 'text-gray-400' : 'text-gray-300' %> text-sm">
105
+ <strong><%= message.user.name %></strong>
106
+ <%= timestamp %>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <% end %>
111
+ <% if message.replies.any? && false %>
112
+ <div class="mb-4">
113
+ <% message.replies.each do |reply| %>
114
+ <div class="flex text-xs font-extralight text-gray-300 ml-12">
115
+ <div class="<%= 'w-full' if current_user_message %>"></div>
116
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 682" class="w-5 h-5 stroke-current mt-4 text-gray-50 fill-current">
117
+ <path d="M0 57.7c.1 145.1 4.1 224 14.5 281.1 19.4 106.3 65.2 156.4 166.3 181.7 48.7 12.1 111.4 18.8 211.7 22.5 23.8.9 196.6 2.8 268.2 3H683l.2 67.8.3 67.8 170.3-102.1L1024 477.3l-170.2-102-170.3-102-.3 67.8-.2 67.9h-75.8c-184.7 0-266.9-4.8-327.2-19-34.2-8.1-62.8-21.1-81.2-37-36.1-31.3-52.3-76.8-58.8-165.5-2-28-3-69.2-3-127.8V0H0v57.7z"/>
118
+ </svg>
119
+ <div class="flex flex-col mr-10 min-w-max">
120
+ <div class="pt-0 mr-2 ml-4 text-xxs"><%= reply.membership.label_string %> reply: </div>
121
+ <div class="bg-gray-100 rounded py-2 px-4 mt-0 text-gray-400 max-w-md"><%= reply.body.html_safe %></div>
122
+ </div>
123
+ </div>
124
+ <% end %>
125
+ </div>
126
+ <% end %>
127
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="flex-grow flex <%= side == :left ? 'justify-start' : 'justify-end order-2' %>">
2
+ <div class=" border-solid border-gray-300 <%= border_classes %> text-white <%= side == :left ? 'ml-12 mr-0' : 'ml-0 mr-12' %> w-6"></div>
3
+ </div>
@@ -15,7 +15,7 @@
15
15
 
16
16
  <% menu = capture do %>
17
17
  <div class="flex items-center flex-shrink-0 p-4 bg-blue-darker md:rounded-tl-lg electron-draggable electron-title-bar dark:bg-black dark:bg-opacity-10">
18
- <%= image_tag image_path('light/logo/logo.png'), class: 'h-5 w-auto mx-auto' %>
18
+ <%= image_tag image_path("logo/logo.png"), class: 'h-5 w-auto mx-auto' %>
19
19
 
20
20
  <div class="lg:hidden absolute right-0">
21
21
  <button class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white dark:ring-transparent"
@@ -1,6 +1,6 @@
1
1
  <%= stylesheet_link_tag 'https://rsms.me/inter/inter.css', media: 'all', 'data-turbo-track': 'reload' %>
2
- <link href="<%= image_path('light/logo/favicon.png') %>" rel="shortcut icon" />
3
- <link href="<%= image_path('light/logo/logo-square-bg.png') %>" rel="apple-touch-icon" />
2
+ <link href="<%= image_path('logo/favicon.png') %>" rel="shortcut icon" />
3
+ <link href="<%= image_path('logo/icon.png') %>" rel="apple-touch-icon" />
4
4
  <%= javascript_include_tag 'application', 'data-turbo-track': 'reload' %>
5
5
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
6
6
  <%= javascript_include_tag 'application.light', 'data-turbo-track': 'reload' %>
@@ -7,14 +7,14 @@
7
7
  <div class="bg-white py-8 px-10 shadow rounded-lg dark:bg-sealBlue-400">
8
8
  <div class="sm:mx-auto sm:w-full sm:max-w-md py-5">
9
9
  <a href="<%= main_app.root_path %>" class="block py-3">
10
- <img alt="" src="<%= image_path("light/logo/logo.png") %>" width="<%= image_width_for_height('light/logo/logo.png', 54) %>" height="54" class="mx-auto h-12 w-auto" />
10
+ <img alt="" src="<%= image_path("logo/logo.png") %>" width="<%= image_width_for_height("logo/logo.png", BulletTrain::Themes.logo_height) %>" height="<%= BulletTrain::Themes.logo_height %>" class="mx-auto h-12 w-auto" />
11
11
  </a>
12
12
 
13
13
  <h1 class="mt-6 text-center text-3xl font-semibold tracking-tight dark:text-white">
14
14
  <%= p.yield :title %>
15
15
  </h1>
16
16
 
17
- <%= render "themes/light/line" %>
17
+ <%= render "shared/line" %>
18
18
  </div>
19
19
 
20
20
  <div class="electron-undraggable pt-5 space-y-5">
@@ -24,8 +24,7 @@
24
24
  </div>
25
25
  </div>
26
26
 
27
- <% # we have to list out the evaluations we want possible above so purgecss includes them in production. %>
27
+ <% # We have to list out every option we want to be available at runtime so they're included in our Tailwind output. %>
28
28
  <% if false %>
29
- <div class="max-w-md"></div>
30
- <div class="max-w-lg"></div>
29
+ <div class="max-w-md max-w-lg"></div>
31
30
  <% end %>
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module Light
4
- VERSION = "1.0.9"
4
+ VERSION = "1.0.12"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes-light
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-27 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -80,6 +80,10 @@ files:
80
80
  - app/views/themes/light/attributes/_block.html.erb
81
81
  - app/views/themes/light/breadcrumbs/_actions.html.erb
82
82
  - app/views/themes/light/commentary/_box.html.erb
83
+ - app/views/themes/light/conversations/_card.html.erb
84
+ - app/views/themes/light/conversations/_comment.html.erb
85
+ - app/views/themes/light/conversations/_message.html.erb
86
+ - app/views/themes/light/conversations/_thread_border.html.erb
83
87
  - app/views/themes/light/fields/_field.html.erb
84
88
  - app/views/themes/light/forms/_errors.html.erb
85
89
  - app/views/themes/light/layouts/_account.html.erb