heathrow 0.7.8 → 0.7.9
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/heathrow/ui/application.rb +68 -7
- data/lib/heathrow/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8023c45996b5eba44dfbb1e9718fe11d149ec7f14f35dd5569fe5172b53a018e
|
|
4
|
+
data.tar.gz: d1f94f8964b220fb7f831ca60298a3ca68f1dc4bdc4b9949282bb7add4c8d65e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b438204942e8ad23d166b36be5acc3dc9a0fa1c2456f9946f258c02d1597176bf0dafde75081e21c469839487938bc8181bf3151cff4fca30d7bd617ae53d18
|
|
7
|
+
data.tar.gz: 1944ede7efac79dac8ace2640dee9c2260754898f8dc24ed1b7793898ed2b3eb57b47cef9fc7102ab8b1da09b20be898aa23312872704301b5aa3fb96a501caf
|
|
@@ -736,6 +736,8 @@ module Heathrow
|
|
|
736
736
|
jump_to_date
|
|
737
737
|
when 'x'
|
|
738
738
|
open_message_external
|
|
739
|
+
when 'X'
|
|
740
|
+
open_in_brrowser
|
|
739
741
|
when 'HOME'
|
|
740
742
|
go_first
|
|
741
743
|
when 'END'
|
|
@@ -1945,6 +1947,9 @@ module Heathrow
|
|
|
1945
1947
|
return
|
|
1946
1948
|
end
|
|
1947
1949
|
|
|
1950
|
+
# Auto-mark as read when content is rendered in the right pane
|
|
1951
|
+
mark_current_message_as_read
|
|
1952
|
+
|
|
1948
1953
|
msg = current_msg
|
|
1949
1954
|
|
|
1950
1955
|
# Lazily load full content if this was a light query result
|
|
@@ -2253,8 +2258,14 @@ module Heathrow
|
|
|
2253
2258
|
end
|
|
2254
2259
|
|
|
2255
2260
|
def render_bottom_bar
|
|
2256
|
-
# Check if there's an active feedback message
|
|
2257
|
-
if @
|
|
2261
|
+
# Check if there's an active feedback message (timed or sticky)
|
|
2262
|
+
if @feedback_sticky && @feedback_message
|
|
2263
|
+
if @panes[:bottom]
|
|
2264
|
+
@panes[:bottom].text = " #{@feedback_message}".fg(@feedback_color || 156)
|
|
2265
|
+
@panes[:bottom].refresh
|
|
2266
|
+
end
|
|
2267
|
+
return
|
|
2268
|
+
elsif @feedback_expires_at && Time.now < @feedback_expires_at
|
|
2258
2269
|
if @panes[:bottom]
|
|
2259
2270
|
@panes[:bottom].text = " #{@feedback_message}".fg(@feedback_color || 156)
|
|
2260
2271
|
@panes[:bottom].refresh
|
|
@@ -3173,6 +3184,47 @@ module Heathrow
|
|
|
3173
3184
|
end
|
|
3174
3185
|
end
|
|
3175
3186
|
|
|
3187
|
+
def open_in_brrowser
|
|
3188
|
+
unless system("which brrowser > /dev/null 2>&1")
|
|
3189
|
+
set_feedback("brrowser not installed. See https://github.com/isene/brrowser", 196, 4)
|
|
3190
|
+
return
|
|
3191
|
+
end
|
|
3192
|
+
|
|
3193
|
+
msg = current_message
|
|
3194
|
+
return unless msg
|
|
3195
|
+
return if header_message?(msg)
|
|
3196
|
+
msg = ensure_full_message(msg)
|
|
3197
|
+
|
|
3198
|
+
# Build URL from message (same logic as open_message_external)
|
|
3199
|
+
url = nil
|
|
3200
|
+
if message_has_html?(msg)
|
|
3201
|
+
html = msg['html_content']
|
|
3202
|
+
html = msg['content'] if !html || html.to_s.strip.empty?
|
|
3203
|
+
tmpfile = "/tmp/heathrow-view-#{msg['id']}.html"
|
|
3204
|
+
File.write(tmpfile, html)
|
|
3205
|
+
url = "file://#{tmpfile}"
|
|
3206
|
+
else
|
|
3207
|
+
meta = msg['metadata']
|
|
3208
|
+
if meta
|
|
3209
|
+
parsed = meta.is_a?(Hash) ? meta : (JSON.parse(meta) rescue {})
|
|
3210
|
+
url = parsed['link'] || parsed['url']
|
|
3211
|
+
end
|
|
3212
|
+
url ||= msg['url'] || msg['link'] || msg['permalink']
|
|
3213
|
+
url ||= msg['external_id'] if msg['external_id']&.start_with?('http')
|
|
3214
|
+
end
|
|
3215
|
+
|
|
3216
|
+
unless url
|
|
3217
|
+
set_feedback("No URL or HTML content to open", 226, 3)
|
|
3218
|
+
return
|
|
3219
|
+
end
|
|
3220
|
+
|
|
3221
|
+
Rcurses.clear_screen
|
|
3222
|
+
system("brrowser '#{url}'")
|
|
3223
|
+
setup_display
|
|
3224
|
+
create_panes
|
|
3225
|
+
render_all
|
|
3226
|
+
end
|
|
3227
|
+
|
|
3176
3228
|
def view_attachments
|
|
3177
3229
|
msg = current_message
|
|
3178
3230
|
return unless msg
|
|
@@ -3378,7 +3430,8 @@ module Heathrow
|
|
|
3378
3430
|
success = @db.mark_as_read(msg['id'])
|
|
3379
3431
|
if success
|
|
3380
3432
|
msg['is_read'] = 1
|
|
3381
|
-
|
|
3433
|
+
sync_maildir_flag(msg, 'S', true)
|
|
3434
|
+
|
|
3382
3435
|
# Re-sort if sorting by unread
|
|
3383
3436
|
if @sort_order == 'unread'
|
|
3384
3437
|
sort_messages
|
|
@@ -4297,13 +4350,19 @@ module Heathrow
|
|
|
4297
4350
|
return if msgs.empty?
|
|
4298
4351
|
|
|
4299
4352
|
count = 0
|
|
4353
|
+
failed = 0
|
|
4354
|
+
filed_ids = Set.new
|
|
4300
4355
|
msgs.each do |msg|
|
|
4301
|
-
|
|
4302
|
-
|
|
4356
|
+
begin
|
|
4357
|
+
file_single_message(msg, dest)
|
|
4358
|
+
filed_ids << msg['id'] if msg['id']
|
|
4359
|
+
count += 1
|
|
4360
|
+
rescue => e
|
|
4361
|
+
failed += 1
|
|
4362
|
+
end
|
|
4303
4363
|
end
|
|
4304
4364
|
|
|
4305
4365
|
# Remove filed messages from current view (by id, works in both flat and threaded mode)
|
|
4306
|
-
filed_ids = msgs.map { |m| m['id'] }.compact.to_set
|
|
4307
4366
|
@filtered_messages.reject! { |m| m['id'] && filed_ids.include?(m['id']) }
|
|
4308
4367
|
if @show_threaded
|
|
4309
4368
|
@display_messages&.reject! { |m| m['id'] && filed_ids.include?(m['id']) }
|
|
@@ -4314,7 +4373,9 @@ module Heathrow
|
|
|
4314
4373
|
@index = [@index, (@filtered_messages.size - 1)].min
|
|
4315
4374
|
@index = 0 if @index < 0 || @filtered_messages.empty?
|
|
4316
4375
|
|
|
4317
|
-
|
|
4376
|
+
msg_text = "Moved #{count} message#{count > 1 ? 's' : ''} to #{dest}"
|
|
4377
|
+
msg_text += " (#{failed} failed)" if failed > 0
|
|
4378
|
+
set_feedback(msg_text, failed > 0 ? 208 : 156, 2)
|
|
4318
4379
|
render_all
|
|
4319
4380
|
end
|
|
4320
4381
|
|
data/lib/heathrow/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: heathrow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Geir Isene
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-03-
|
|
12
|
+
date: 2026-03-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rcurses
|