Merge commit '5d4dbbcc67c98007d417cbe67b5a2261889304dc' into glitch-soc/merge-upstream
This commit is contained in:
commit
d2aea85e6c
164 files changed
+1857
-1159
No files matched your search
@@ -128,6 +128,22 @@ class PreviewCard < ApplicationRecord
|
||||
@history ||= Trends::History.new('links', id)
|
||||
end
|
||||
|
||||
def authors
|
||||
@authors ||= [PreviewCard::Author.new(self)]
|
||||
end
|
||||
|
||||
class Author < ActiveModelSerializers::Model
|
||||
attributes :name, :url, :account
|
||||
|
||||
def initialize(preview_card)
|
||||
super(
|
||||
name: preview_card.author_name,
|
||||
url: preview_card.author_url,
|
||||
account: preview_card.author_account,
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
class << self
|
||||
private
|
||||
|
||||
|
||||
@@ -31,17 +31,10 @@ class SiteUpload < ApplicationRecord
|
||||
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
|
||||
end.freeze,
|
||||
|
||||
favicon: {
|
||||
ico: {
|
||||
format: 'ico',
|
||||
geometry: '48x48#',
|
||||
file_geometry_parser: FastGeometryParser,
|
||||
}.freeze,
|
||||
}.merge(
|
||||
favicon:
|
||||
FAVICON_SIZES.to_h do |size|
|
||||
[:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }]
|
||||
end
|
||||
).freeze,
|
||||
end.freeze,
|
||||
|
||||
thumbnail: {
|
||||
'@1x': {
|
||||
|
||||
Reference in new issue
Block a user