Compare commits

..

No commits in common. "51f581e03e1b2611eceddf5010ef736680e1f62b" and "8c0ff6498e090a2919e8f8104339796ed2d3d212" have entirely different histories.

11 changed files with 25 additions and 25 deletions

View File

@ -101,16 +101,16 @@ GEM
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.947.0)
aws-sdk-core (3.199.0)
aws-sdk-core (3.198.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-kms (1.86.0)
aws-sdk-core (~> 3, >= 3.198.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.154.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-s3 (1.153.0)
aws-sdk-core (~> 3, >= 3.198.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)

View File

@ -31,10 +31,17 @@ class SiteUpload < ApplicationRecord
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
end.freeze,
favicon:
favicon: {
ico: {
format: 'ico',
geometry: '48x48#',
file_geometry_parser: FastGeometryParser,
}.freeze,
}.merge(
FAVICON_SIZES.to_h do |size|
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
end.freeze,
end
).freeze,
thumbnail: {
'@1x': {

View File

@ -11,6 +11,8 @@
- if storage_host?
%link{ rel: 'dns-prefetch', href: storage_host }/
%link{ rel: 'icon', href: favicon_path('ico') || '/favicon.ico', type: 'image/x-icon' }/
- SiteUpload::FAVICON_SIZES.each do |size|
%link{ rel: 'icon', sizes: "#{size}x#{size}", href: favicon_path(size.to_i) || frontend_asset_path("icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/

View File

@ -23,5 +23,5 @@
<!-- Disallow any coder by default, and only enable ones required by Mastodon -->
<policy domain="coder" rights="none" pattern="*" />
<policy domain="coder" rights="read | write" pattern="{JPEG,PNG,GIF,WEBP,HEIC,AVIF}" />
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO}" />
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO,ICO}" />
</policymap>

View File

@ -1,11 +1,7 @@
# frozen_string_literal: true
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
def up
def change
change_column :statuses, :uri, :string, null: true, default: nil
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
def up
def change
change_table(:statuses, bulk: true) do |t|
t.change :id, :bigint
t.change :reblog_of_id, :bigint
@ -16,8 +16,4 @@ class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
change_column :statuses_tags, :status_id, :bigint
change_column :stream_entries, :activity_id, :bigint
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View File

@ -5,7 +5,7 @@ class ChangeLanguageFilterToOptOut < ActiveRecord::Migration[5.0]
remove_index :users, :allowed_languages
change_table(:users, bulk: true) do |t|
t.remove :allowed_languages, type: :string, array: true, default: [], null: false
t.remove :allowed_languages
t.column :filtered_languages, :string, array: true, default: [], null: false
end

View File

@ -1,11 +1,7 @@
# frozen_string_literal: true
class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1]
def up
def change
change_column :statuses, :language, :string, default: nil, null: true
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View File

@ -42,6 +42,7 @@ namespace :branding do
output_dest = Rails.root.join('app', 'javascript', 'icons')
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :size -h :size --keep-aspect-ratio :input -o :output')
convert = Terrapin::CommandLine.new('convert', ':input :output', environment: { 'MAGICK_CONFIGURE_PATH' => nil })
favicon_sizes = [16, 32, 48]
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
@ -55,6 +56,8 @@ namespace :branding do
rsvg_convert.run(size: size, input: favicon_source, output: output_path)
end
convert.run(input: favicons, output: Rails.public_path.join('favicon.ico'))
apple_icon_sizes.each do |size|
rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("apple-touch-icon-#{size}x#{size}.png"))
end

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -9,7 +9,7 @@ describe 'The account show page' do
get '/@alice'
expect(head_link_icons.size).to eq(3) # Three favicons with sizes
expect(head_link_icons.size).to eq(4) # One general favicon and three with sizes
expect(head_meta_content('og:title')).to match alice.display_name
expect(head_meta_content('og:type')).to eq 'profile'