mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-12 23:43:23 +00:00
Compare commits
4 Commits
8c0ff6498e
...
51f581e03e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
51f581e03e | ||
![]() |
528a7f57fa | ||
![]() |
7a84b76bb1 | ||
![]() |
2b43c05a6a |
10
Gemfile.lock
10
Gemfile.lock
|
@ -101,16 +101,16 @@ GEM
|
||||||
awrence (1.2.1)
|
awrence (1.2.1)
|
||||||
aws-eventstream (1.3.0)
|
aws-eventstream (1.3.0)
|
||||||
aws-partitions (1.947.0)
|
aws-partitions (1.947.0)
|
||||||
aws-sdk-core (3.198.0)
|
aws-sdk-core (3.199.0)
|
||||||
aws-eventstream (~> 1, >= 1.3.0)
|
aws-eventstream (~> 1, >= 1.3.0)
|
||||||
aws-partitions (~> 1, >= 1.651.0)
|
aws-partitions (~> 1, >= 1.651.0)
|
||||||
aws-sigv4 (~> 1.8)
|
aws-sigv4 (~> 1.8)
|
||||||
jmespath (~> 1, >= 1.6.1)
|
jmespath (~> 1, >= 1.6.1)
|
||||||
aws-sdk-kms (1.86.0)
|
aws-sdk-kms (1.87.0)
|
||||||
aws-sdk-core (~> 3, >= 3.198.0)
|
aws-sdk-core (~> 3, >= 3.199.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.153.0)
|
aws-sdk-s3 (1.154.0)
|
||||||
aws-sdk-core (~> 3, >= 3.198.0)
|
aws-sdk-core (~> 3, >= 3.199.0)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.8)
|
aws-sigv4 (~> 1.8)
|
||||||
aws-sigv4 (1.8.0)
|
aws-sigv4 (1.8.0)
|
||||||
|
|
|
@ -31,17 +31,10 @@ class SiteUpload < ApplicationRecord
|
||||||
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
|
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
|
||||||
end.freeze,
|
end.freeze,
|
||||||
|
|
||||||
favicon: {
|
favicon:
|
||||||
ico: {
|
|
||||||
format: 'ico',
|
|
||||||
geometry: '48x48#',
|
|
||||||
file_geometry_parser: FastGeometryParser,
|
|
||||||
}.freeze,
|
|
||||||
}.merge(
|
|
||||||
FAVICON_SIZES.to_h do |size|
|
FAVICON_SIZES.to_h do |size|
|
||||||
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
|
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
|
||||||
end
|
end.freeze,
|
||||||
).freeze,
|
|
||||||
|
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
'@1x': {
|
'@1x': {
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
- if storage_host?
|
- if storage_host?
|
||||||
%link{ rel: 'dns-prefetch', href: 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|
|
- 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' }/
|
%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' }/
|
||||||
|
|
||||||
|
|
|
@ -23,5 +23,5 @@
|
||||||
<!-- Disallow any coder by default, and only enable ones required by Mastodon -->
|
<!-- Disallow any coder by default, and only enable ones required by Mastodon -->
|
||||||
<policy domain="coder" rights="none" pattern="*" />
|
<policy domain="coder" rights="none" pattern="*" />
|
||||||
<policy domain="coder" rights="read | write" pattern="{JPEG,PNG,GIF,WEBP,HEIC,AVIF}" />
|
<policy domain="coder" rights="read | write" pattern="{JPEG,PNG,GIF,WEBP,HEIC,AVIF}" />
|
||||||
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO,ICO}" />
|
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO}" />
|
||||||
</policymap>
|
</policymap>
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
|
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def up
|
||||||
change_column :statuses, :uri, :string, null: true, default: nil
|
change_column :statuses, :uri, :string, null: true, default: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
|
class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
|
||||||
def change
|
def up
|
||||||
change_table(:statuses, bulk: true) do |t|
|
change_table(:statuses, bulk: true) do |t|
|
||||||
t.change :id, :bigint
|
t.change :id, :bigint
|
||||||
t.change :reblog_of_id, :bigint
|
t.change :reblog_of_id, :bigint
|
||||||
|
@ -16,4 +16,8 @@ class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0]
|
||||||
change_column :statuses_tags, :status_id, :bigint
|
change_column :statuses_tags, :status_id, :bigint
|
||||||
change_column :stream_entries, :activity_id, :bigint
|
change_column :stream_entries, :activity_id, :bigint
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ class ChangeLanguageFilterToOptOut < ActiveRecord::Migration[5.0]
|
||||||
remove_index :users, :allowed_languages
|
remove_index :users, :allowed_languages
|
||||||
|
|
||||||
change_table(:users, bulk: true) do |t|
|
change_table(:users, bulk: true) do |t|
|
||||||
t.remove :allowed_languages
|
t.remove :allowed_languages, type: :string, array: true, default: [], null: false
|
||||||
t.column :filtered_languages, :string, array: true, default: [], null: false
|
t.column :filtered_languages, :string, array: true, default: [], null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1]
|
class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def up
|
||||||
change_column :statuses, :language, :string, default: nil, null: true
|
change_column :statuses, :language, :string, default: nil, null: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,7 +42,6 @@ namespace :branding do
|
||||||
output_dest = Rails.root.join('app', 'javascript', 'icons')
|
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')
|
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]
|
favicon_sizes = [16, 32, 48]
|
||||||
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
|
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
|
||||||
|
@ -56,8 +55,6 @@ namespace :branding do
|
||||||
rsvg_convert.run(size: size, input: favicon_source, output: output_path)
|
rsvg_convert.run(size: size, input: favicon_source, output: output_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
convert.run(input: favicons, output: Rails.public_path.join('favicon.ico'))
|
|
||||||
|
|
||||||
apple_icon_sizes.each do |size|
|
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"))
|
rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("apple-touch-icon-#{size}x#{size}.png"))
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
|
@ -9,7 +9,7 @@ describe 'The account show page' do
|
||||||
|
|
||||||
get '/@alice'
|
get '/@alice'
|
||||||
|
|
||||||
expect(head_link_icons.size).to eq(4) # One general favicon and three with sizes
|
expect(head_link_icons.size).to eq(3) # Three favicons with sizes
|
||||||
|
|
||||||
expect(head_meta_content('og:title')).to match alice.display_name
|
expect(head_meta_content('og:title')).to match alice.display_name
|
||||||
expect(head_meta_content('og:type')).to eq 'profile'
|
expect(head_meta_content('og:type')).to eq 'profile'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user