mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-14 08:18:15 +00:00
Compare commits
No commits in common. "51f581e03e1b2611eceddf5010ef736680e1f62b" and "8c0ff6498e090a2919e8f8104339796ed2d3d212" have entirely different histories.
51f581e03e
...
8c0ff6498e
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.199.0)
|
aws-sdk-core (3.198.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.87.0)
|
aws-sdk-kms (1.86.0)
|
||||||
aws-sdk-core (~> 3, >= 3.199.0)
|
aws-sdk-core (~> 3, >= 3.198.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.154.0)
|
aws-sdk-s3 (1.153.0)
|
||||||
aws-sdk-core (~> 3, >= 3.199.0)
|
aws-sdk-core (~> 3, >= 3.198.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,10 +31,17 @@ 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.freeze,
|
end
|
||||||
|
).freeze,
|
||||||
|
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
'@1x': {
|
'@1x': {
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
- 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}" />
|
<policy domain="coder" rights="write" pattern="{HISTOGRAM,RGB,INFO,ICO}" />
|
||||||
</policymap>
|
</policymap>
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
|
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def change
|
||||||
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 up
|
def change
|
||||||
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,8 +16,4 @@ 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, type: :string, array: true, default: [], null: false
|
t.remove :allowed_languages
|
||||||
t.column :filtered_languages, :string, array: true, default: [], null: false
|
t.column :filtered_languages, :string, array: true, default: [], null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1]
|
class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1]
|
||||||
def up
|
def change
|
||||||
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,6 +42,7 @@ 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]
|
||||||
|
@ -55,6 +56,8 @@ 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
|
||||||
|
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After 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(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: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