Skip to content

Commit f131079

Browse files
committed
Merge tag 'v1.50.13' into dev-tbyte
2 parents 9cb39bd + 3fe6c48 commit f131079

File tree

110 files changed

+830
-2749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+830
-2749
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ gem "cssbundling-rails", "~> 1.4"
7474
gem "terser", "~> 1.2"
7575
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
7676
gem "bootstrap"
77-
gem "json", "~> 2.9" # Legacy carry-over
77+
gem "json", "~> 2.10" # Legacy carry-over
7878

7979
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
8080
gem "turbo-rails"

Gemfile.lock

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,17 @@ GEM
9797
autoprefixer-rails (10.4.19.0)
9898
execjs (~> 2)
9999
aws-eventstream (1.3.0)
100-
aws-partitions (1.1046.0)
101-
aws-sdk-core (3.217.1)
100+
aws-partitions (1.1049.0)
101+
aws-sdk-core (3.218.1)
102102
aws-eventstream (~> 1, >= 1.3.0)
103103
aws-partitions (~> 1, >= 1.992.0)
104104
aws-sigv4 (~> 1.9)
105+
base64
105106
jmespath (~> 1, >= 1.6.1)
106-
aws-sdk-kms (1.97.0)
107+
aws-sdk-kms (1.98.0)
107108
aws-sdk-core (~> 3, >= 3.216.0)
108109
aws-sigv4 (~> 1.5)
109-
aws-sdk-s3 (1.179.0)
110+
aws-sdk-s3 (1.180.0)
110111
aws-sdk-core (~> 3, >= 3.216.0)
111112
aws-sdk-kms (~> 1)
112113
aws-sigv4 (~> 1.5)
@@ -137,7 +138,7 @@ GEM
137138
bootstrap (5.3.3)
138139
autoprefixer-rails (>= 9.1.0)
139140
popper_js (>= 2.11.8, < 3)
140-
brakeman (6.2.2)
141+
brakeman (7.0.0)
141142
racc
142143
builder (3.3.0)
143144
capybara (3.40.0)
@@ -303,7 +304,7 @@ GEM
303304
rails-dom-testing (>= 1, < 3)
304305
railties (>= 4.2.0)
305306
thor (>= 0.14, < 2.0)
306-
json (2.9.1)
307+
json (2.10.1)
307308
jwt (2.10.1)
308309
base64
309310
kaminari (1.2.2)
@@ -368,14 +369,14 @@ GEM
368369
railties (>= 7.1)
369370
stimulus-rails
370371
turbo-rails
371-
msgpack (1.7.5)
372+
msgpack (1.8.0)
372373
multi_json (1.15.0)
373374
multipart-post (2.4.1)
374375
mutex_m (0.3.0)
375376
mysql2 (0.5.6)
376377
net-http-persistent (4.0.5)
377378
connection_pool (~> 2.2)
378-
net-imap (0.5.5)
379+
net-imap (0.5.6)
379380
date
380381
net-protocol
381382
net-pop (0.1.2)
@@ -399,7 +400,7 @@ GEM
399400
iniparse (~> 1.4)
400401
rexml (>= 3.3.9)
401402
parallel (1.26.3)
402-
parser (3.3.7.0)
403+
parser (3.3.7.1)
403404
ast (~> 2.4.1)
404405
racc
405406
pg (1.5.9)
@@ -474,7 +475,7 @@ GEM
474475
rb-fsevent (0.11.2)
475476
rb-inotify (0.11.1)
476477
ffi (~> 1.0)
477-
rdoc (6.11.0)
478+
rdoc (6.12.0)
478479
psych (>= 4.0.0)
479480
regexp_parser (2.10.0)
480481
reline (0.6.0)
@@ -490,7 +491,7 @@ GEM
490491
railties (>= 5.2)
491492
retriable (3.1.2)
492493
rexml (3.4.0)
493-
rollbar (3.6.0)
494+
rollbar (3.6.1)
494495
rqrcode (2.2.0)
495496
chunky_png (~> 1.0)
496497
rqrcode_core (~> 1.0)
@@ -659,7 +660,7 @@ DEPENDENCIES
659660
i18n-tasks (~> 1.0.14)
660661
invisible_captcha (~> 2.3)
661662
jbuilder
662-
json (~> 2.9)
663+
json (~> 2.10)
663664
kaminari (~> 1.2)
664665
kramdown
665666
listen

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.50.11
1+
1.50.13

app/assets/stylesheets/application.bootstrap.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
$accordion-color: #fff;
2+
$color-mode-type: media-query;
23

34
@use "@fontsource/roboto";
45
@use "@fontsource/roboto-slab";

app/controllers/users/sessions_controller.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ class Users::SessionsController < Devise::SessionsController
2020
# super
2121
# end
2222

23+
# after_sign_out_path_for
24+
#
25+
# This method is called after the user has signed out.
26+
# Ensure the session data is cleared and the session cookie is deleted.
27+
#
28+
def after_sign_out_path_for(resource_or_scope)
29+
reset_session # Explicitly clear the session data
30+
cookies.delete("_PasswordPusher_session") # Delete the session cookie
31+
root_path # Redirect to the root path after logout
32+
end
33+
2334
# protected
2435

2536
# If you have extra params to permit, append them to the sanitizer.

app/javascript/controllers/application.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,19 @@ console.log(' --> 🏝 May all your pushes be stored securely, read once and exp
1111

1212
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)");
1313

14-
if (prefersDarkScheme.matches) {
15-
document.body.classList.add('dark-mode')
16-
} else {
17-
document.body.classList.remove('dark-mode')
14+
// Function to handle theme changes
15+
const handleThemeChange = (e) => {
16+
if (e.matches) {
17+
document.documentElement.setAttribute('data-bs-theme', 'dark')
18+
} else {
19+
document.documentElement.setAttribute('data-bs-theme', 'light')
20+
}
1821
}
1922

23+
// Initial check
24+
handleThemeChange(prefersDarkScheme);
25+
26+
// Listen for changes
27+
prefersDarkScheme.addEventListener('change', handleThemeChange);
28+
2029
export { application }
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<% if push.files.attached? && Rails.application.config.active_storage.try(:service).to_s != "local" %>
2+
<div class="text-muted fs-6">
3+
<%= t('application.push_expiration.will_expire_in') %> <span id="countdown-timer">4:59</span>
4+
<div class="mt-2 mb-4">
5+
<%= t('application.push_expiration.you_can_refresh') %>
6+
</div>
7+
</div>
8+
<script>
9+
var endTime = new Date().getTime() + 5 * 60 * 1000; // 5 minutes in milliseconds
10+
var countdown = setInterval(function() {
11+
var now = new Date().getTime();
12+
var timeRemaining = endTime - now;
13+
14+
if (timeRemaining < 0) {
15+
clearInterval(countdown);
16+
document.getElementById("countdown-timer").innerHTML = "<%= t('words.expired') %>";
17+
} else {
18+
var minutes = Math.floor((timeRemaining % (1000 * 60 * 60)) / (1000 * 60));
19+
var seconds = Math.floor((timeRemaining % (1000 * 60)) / 1000);
20+
seconds = seconds.toString().padStart(2, '0');
21+
document.getElementById("countdown-timer").innerHTML = minutes + ":" + seconds;
22+
}
23+
}, 1000);
24+
</script>
25+
<% end %>

app/views/file_pushes/show.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
<%= _('(whichever occurs first).') %>
5252
<% end %>
5353
</p>
54+
<%= render partial: 'application/push_expiration', locals: { push: @push } %>
5455
<% if @push.deletable_by_viewer && @push.views_remaining.positive? %>
5556
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">
5657
<em class="bi bi-trash"></em> <%= _('Delete This Secret Link Now') %>

bin/move_up_stable_tag.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,15 @@ for IMAGE in "${IMAGES[@]}"; do
4646
docker manifest push "${IMAGE}:${ALIAS_TAG}"
4747
done
4848

49-
echo "All images have been tagged as '${ALIAS_TAG}' successfully."
49+
echo "Checking out version tag: v${SOURCE_TAG}"
50+
git checkout "v${SOURCE_TAG}"
51+
52+
echo "Deleting the 'stable' tag from git: local and remote"
53+
git tag -d "${ALIAS_TAG}"
54+
git push oss --delete "${ALIAS_TAG}"
55+
56+
echo "Moving stable tag to new version: v${SOURCE_TAG}"
57+
git tag "${ALIAS_TAG}"
58+
git push oss "${ALIAS_TAG}"
59+
60+
echo "v${SOURCE_TAG} has been tagged as '${ALIAS_TAG}' successfully."

config/application.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class Application < Rails::Application
1616
config.load_defaults 7.2
1717
config.active_support.cache_format_version = 7.0
1818

19+
config.active_storage.urls_expire_in = 5.minutes
20+
config.active_storage.routes_prefix = "/pfb"
21+
1922
# Please, add to the `ignore` list any other `lib` subdirectories that do
2023
# not contain `.rb` files, or that should not be reloaded or eager loaded.
2124
# Common ones are `templates`, `generators`, or `middleware`, for example.

0 commit comments

Comments
 (0)