diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a288ee64f..57f4819c0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -108,17 +108,13 @@ module ApplicationHelper tag.time content || datetime, datetime: datetime, title: time.to_formatted_s, **options end - def humanized_duration(from, to, compact: false) + def humanized_duration(from, to) if to - from > 10.years duration = "forever" else duration = distance_of_time_in_words(from, to) end - if compact - duration = duration.gsub(/almost|about|over/, "").gsub(/less than a/, "<1").strip - end - datetime = from.iso8601 + "/" + to.iso8601 title = "#{from.strftime("%Y-%m-%d %H:%M")} to #{to.strftime("%Y-%m-%d %H:%M")}" diff --git a/app/javascript/src/javascripts/common.js b/app/javascript/src/javascripts/common.js index cc04ab125..90fc89347 100644 --- a/app/javascript/src/javascripts/common.js +++ b/app/javascript/src/javascripts/common.js @@ -7,13 +7,6 @@ $(function() { e.preventDefault(); }); - $("#hide-promotion-notice").on("click.danbooru", function(e) { - $("#promotion-notice").hide(); - Cookie.put("hide_final_promotion_notice", "1", 3 * 60 * 60); - Cookie.put("hide_upgrade_account_notice", "1", 7 * 24 * 60 * 60); - e.preventDefault(); - }); - $("#hide-dmail-notice").on("click.danbooru", function(e) { var $dmail_notice = $("#dmail-notice"); $dmail_notice.hide(); diff --git a/app/models/user.rb b/app/models/user.rb index 732bf3079..01730294c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -404,9 +404,7 @@ class User < ApplicationRecord end def tag_query_limit - if is_member? && Danbooru.config.is_promotion? - 1_000_000 - elsif is_platinum? + if is_platinum? Danbooru.config.base_tag_query_limit * 2 elsif is_gold? Danbooru.config.base_tag_query_limit diff --git a/app/models/user_upgrade.rb b/app/models/user_upgrade.rb index 69f580f5c..48083c6d4 100644 --- a/app/models/user_upgrade.rb +++ b/app/models/user_upgrade.rb @@ -35,11 +35,7 @@ class UserUpgrade < ApplicationRecord end def self.gold_price - if Danbooru.config.is_promotion? - 1500 - else - 2000 - end + 2000 end def self.platinum_price @@ -168,9 +164,6 @@ class UserUpgrade < ApplicationRecord price: price_id, quantity: 1, }], - discounts: [{ - coupon: promotion_discount_id, - }], metadata: { user_upgrade_id: id, purchaser_id: purchaser.id, @@ -228,12 +221,6 @@ class UserUpgrade < ApplicationRecord !pending? end - def promotion_discount_id - if Danbooru.config.is_promotion? - Danbooru.config.stripe_promotion_discount_id - end - end - def upgrade_price_id(currency) case [upgrade_type, currency] when ["gold", "usd"] diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 7c6606f56..c79fa8acb 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -70,18 +70,6 @@
- <%= tag.img src: "/images/padoru.gif", width: 24, height: 24 %> - Danbooru Winter Sale! Gold and Platinum upgrades are 25% off. Sale ends in <%= Time.use_zone("UTC") { humanized_duration(Time.zone.parse("2021-01-01"), Time.zone.now, compact: true) } %>. - <%= tag.img src: "/images/padoru.gif", width: 24, height: 24 %> -
- <% end %> -Upgrading your account gives you exclusive benefits and helps support <%= Danbooru.config.canonical_app_name %>. Your support helps keep the site ad-free for everyone!
@@ -52,16 +44,10 @@