Merge remote-tracking branch 'parent/main' into upstream-20240408

This commit is contained in:
KMY 2024-04-08 07:44:47 +09:00
commit 45c5c7b055
27 changed files with 326 additions and 121 deletions

View file

@ -46,11 +46,11 @@ class Admin::Metrics::Measure::TagServersMeasure < Admin::Metrics::Measure::Base
end
def earliest_status_id
Mastodon::Snowflake.id_at(@start_at, with_random: false)
Mastodon::Snowflake.id_at(@start_at.beginning_of_day, with_random: false)
end
def latest_status_id
Mastodon::Snowflake.id_at(@end_at, with_random: false)
Mastodon::Snowflake.id_at(@end_at.end_of_day, with_random: false)
end
def tag

View file

@ -16,6 +16,6 @@ class AnnualReport::TopStatuses < AnnualReport::Source
end
def base_scope
@account.statuses.with_public_visibility.joins(:status_stat).where(id: year_as_snowflake_range).reorder(nil)
@account.statuses.public_visibility.joins(:status_stat).where(id: year_as_snowflake_range).reorder(nil)
end
end

View file

@ -6,8 +6,10 @@ require 'yaml'
class Themes
include Singleton
MASTODON_DARK_THEME_COLOR = '#191b22'
MASTODON_LIGHT_THEME_COLOR = '#f3f5f7'
THEME_COLORS = {
dark: '#191b22',
light: '#f3f5f7',
}.freeze
def initialize
@conf = YAML.load_file(Rails.root.join('config', 'themes.yml'))