Files
danbooru/app/components/source_data_component.rb
evazion 7bbe6e9d22 artists: make artist pages less shit.
* Group URLs by site.
* List most important URLs first and dead URLs last.
* Add site icons next to URLs.
* Put other names and group name beneath the artist name, instead of beneath the wiki.
2022-02-08 22:20:01 -06:00

17 lines
334 B
Ruby

# frozen_string_literal: true
class SourceDataComponent < ApplicationComponent
attr_reader :source
delegate :spinner_icon, :external_site_icon, to: :helpers
def initialize(source:)
super
@source = source
end
def profile_urls(artist)
artist.sorted_urls.select(&:is_active?).reject(&:secondary_url?)
end
end