Announce the temporary server upgrade (and refactor announcement helper)

This commit is contained in:
Emi Matchu 2024-12-01 19:26:42 -08:00
parent ea5c315c2a
commit c32a495780
3 changed files with 13 additions and 16 deletions

View file

@ -213,6 +213,10 @@ module ApplicationHelper
@hide_title_header = true @hide_title_header = true
end end
def hide_after(last_day, &block)
yield if Date.today <= last_day
end
def use_responsive_design def use_responsive_design
@use_responsive_design = true @use_responsive_design = true
add_body_class "use-responsive-design" add_body_class "use-responsive-design"

View file

@ -1,9 +1,4 @@
module OutfitsHelper module OutfitsHelper
LAST_DAY_OF_ANNOUNCEMENT = Date.parse("2024-11-08")
def show_announcement?
Date.today <= LAST_DAY_OF_ANNOUNCEMENT
end
def destination_tag(value) def destination_tag(value)
hidden_field_tag 'destination', value, :id => nil hidden_field_tag 'destination', value, :id => nil
end end

View file

@ -4,21 +4,19 @@
%p#pet-not-found.alert= t 'pets.load.not_found' %p#pet-not-found.alert= t 'pets.load.not_found'
- if show_announcement? - hide_after Date.new(2024, 12, 8) do
%section.announcement %section.announcement
= image_tag "/images/error-grundo.png", width: 70, height: 70, = image_tag "about/announcement.png", width: 70, height: 70,
srcset: {"/images/error-grundo.png": "2x"} srcset: {"about/announcement@2x.png": "2x"}
.content .content
%p %p
%strong %strong Oh wow, it's busy this time of year!
Oops, sorry for the bugs recently! We've temporarily moved to a bigger server, to help us handle the extra
For the first time in One Million Years, we made some changes to our load. Hopefully this keeps us running smooth!
modeling code—and it looks like we goofed it, and started gradually
losing some data!
%p %p
We've restored a backup from before we made these changes, so most Happy holidays, everyone! Here's hoping you, and your families, and your
everything is back in order! None of your personal data was affected. precious pets—both online and off—stay happy and healthy for the year
Sorry for the disruption, and hope everyone is doing okay! 💜 to come 💜
#outfit-forms #outfit-forms
#pet-preview #pet-preview