livechat 0.6.2 → 0.6.3

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: ebf70396ba82be98cc6f9332c276c5314a14b3ba4330f99646505ce1dd293e7e
4
- data.tar.gz: f48e3578174194d4a501cfc2fd30a7f5772e58b8b9a79399c46073eb4bdac003
3
+ metadata.gz: 73bea8a61c28ee7ab2edd008d312343e3373f1737123578fac9935bc7b639ad0
4
+ data.tar.gz: 75f34e42994adde044ac3bbae1325b4e1997e46c6929bd182a0ca5b87cc1f6bd
5
5
  SHA512:
6
- metadata.gz: ef83bc9a0d405fc0aa5ad055a12243e83a0a2d35d1f9ed058c68b27381c9965575747372992f69fc87fe70a909e8b06f44a7b31df410216e758a7a5aed9c0910
7
- data.tar.gz: f77398569393337ae0cf9f023bb887c3ac0d15aa07b34b05669d98af643124f949a41b4d77089b14b30a116e9cfec6fb350689a9d59316f20f5353991bc7aeca
6
+ metadata.gz: 37ffa3aa93aabfd29e2cbeefb28c1c527be13cb7744650a118209d04504388289ae79c44282414667794c756c737b234ef9dee4adac6579d6159f312aaf14847
7
+ data.tar.gz: 7f2b06392e757eefb86b1b7cc729aae38721a210289eebfee584c9b8727a4d7dca114390afe4eb7a7e5482b2f358241bb0246299a80a0a51fc1976b1a1913ee0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.3
4
+
5
+ - Replaced the selected thread's separate status badge and resolve/reopen
6
+ button with a compact Open/Resolved status toggle.
7
+ - Refreshed the README inbox screenshots to show the new status toggle.
8
+
3
9
  ## 0.6.2
4
10
 
5
11
  - Reworked the inbox into a two-column desktop layout: conversation list on the
@@ -61,6 +61,20 @@
61
61
  .head-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
62
62
  .head-row h1 { margin: 0; flex: 1; }
63
63
  .head-row form { display: inline; }
64
+ .status-toggle-form { flex: 0 0 auto; }
65
+ .status-toggle { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 176px;
66
+ min-height: 36px; padding: 3px; border-radius: 999px; border: 1px solid var(--border);
67
+ background: var(--bg); color: var(--muted); overflow: hidden; }
68
+ .status-toggle::before { content: ""; position: absolute; z-index: 0; top: 3px; bottom: 3px;
69
+ width: calc(50% - 3px); border-radius: 999px; background: var(--surface);
70
+ box-shadow: 0 1px 2px rgba(15, 23, 42, .12); transition: left .16s ease; }
71
+ .status-toggle.is-open::before { left: 3px; }
72
+ .status-toggle.is-resolved::before { left: 50%; }
73
+ .status-toggle span { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
74
+ min-width: 0; padding: 0 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
75
+ .status-toggle.is-open span:first-child { color: var(--open); }
76
+ .status-toggle.is-resolved span:last-child { color: var(--text); }
77
+ .status-toggle:hover { text-decoration: none; color: var(--text); }
64
78
  button, .button { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
65
79
  background: var(--surface); color: var(--text); font: inherit; }
66
80
  button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
@@ -223,6 +237,8 @@
223
237
  .inbox-thread .conversation-panel { padding: 0; }
224
238
  .mobile-back { display: block; flex: 0 0 auto; margin: 10px 10px 0; font-size: 13px; }
225
239
  .conversation-panel .head-row h1 { font-size: 18px; }
240
+ .status-toggle { width: 152px; min-height: 34px; }
241
+ .status-toggle span { padding: 0 7px; font-size: 12px; }
226
242
  .thread .msg { max-width: 88%; }
227
243
  }
228
244
  </style>
@@ -1,15 +1,22 @@
1
1
  <div class="conversation-panel">
2
2
  <div class="head-row">
3
3
  <h1><%= conversation.display_name %> <span class="case-id">#<%= conversation.id %></span></h1>
4
- <span class="badge status-<%= conversation.status %>">
5
- <%= t("livechat.statuses.#{conversation.status}", default: conversation.status.humanize) %>
6
- </span>
7
4
  <% if conversation.open? %>
8
- <%= button_to t('livechat.dashboard.resolve', default: 'Resolve'),
9
- resolve_conversation_path(conversation) %>
5
+ <%= button_to resolve_conversation_path(conversation), method: :post,
6
+ form_class: 'status-toggle-form',
7
+ class: 'status-toggle is-open',
8
+ aria: { label: t('livechat.dashboard.resolve', default: 'Resolve') } do %>
9
+ <span><%= t('livechat.statuses.open', default: 'Open') %></span>
10
+ <span><%= t('livechat.statuses.resolved', default: 'Resolved') %></span>
11
+ <% end %>
10
12
  <% else %>
11
- <%= button_to t('livechat.dashboard.reopen', default: 'Reopen'),
12
- reopen_conversation_path(conversation) %>
13
+ <%= button_to reopen_conversation_path(conversation), method: :post,
14
+ form_class: 'status-toggle-form',
15
+ class: 'status-toggle is-resolved',
16
+ aria: { label: t('livechat.dashboard.reopen', default: 'Reopen') } do %>
17
+ <span><%= t('livechat.statuses.open', default: 'Open') %></span>
18
+ <span><%= t('livechat.statuses.resolved', default: 'Resolved') %></span>
19
+ <% end %>
13
20
  <% end %>
14
21
  </div>
15
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Livechat
4
- VERSION = '0.6.2'
4
+ VERSION = '0.6.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livechat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov