Merge upstream (#81)
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
- content_for :header_tags do
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
|
||||
|
||||
- content_for :page_title do
|
||||
= site_hostname
|
||||
|
||||
- content_for :header_tags do
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
= javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous'
|
||||
|
||||
%meta{ property: 'og:site_name', content: site_title }/
|
||||
%meta{ property: 'og:url', content: about_url }/
|
||||
%meta{ property: 'og:type', content: 'website' }/
|
||||
|
@ -1,9 +0,0 @@
|
||||
extends 'activitypub/types/person.activitystreams2.rabl'
|
||||
|
||||
object @account
|
||||
|
||||
attributes display_name: :name, username: :preferredUsername, note: :summary
|
||||
|
||||
node(:icon) { |account| full_asset_url(account.avatar.url(:original)) }
|
||||
node(:image) { |account| full_asset_url(account.header.url(:original)) }
|
||||
node(:outbox) { |account| api_activitypub_outbox_url(account.id) }
|
@ -2,6 +2,9 @@
|
||||
= display_name(@account)
|
||||
|
||||
- content_for :header_tags do
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
%link{ rel: 'salmon', href: api_salmon_url(@account.id) }/
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(@account, format: 'atom') }/
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
node(:'@context') { 'https://www.w3.org/ns/activitystreams' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/base.activitystreams2.rabl'
|
||||
|
||||
node(:id) { request.original_url }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/intransient.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'Announce' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/intransient.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'Collection' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/intransient.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'Create' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/intransient.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'Note' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/types/collection.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'OrderedCollection' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/types/ordered_collection.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'OrderedCollectionPage' }
|
@ -1,3 +0,0 @@
|
||||
extends 'activitypub/intransient.activitystreams2.rabl'
|
||||
|
||||
node(:type) { 'Person' }
|
@ -1,4 +0,0 @@
|
||||
object @status
|
||||
|
||||
node(:actor) { |status| TagManager.instance.url_for(status.account) }
|
||||
node(:published) { |status| status.created_at.to_time.xmlschema }
|
@ -1,8 +0,0 @@
|
||||
extends 'activitypub/types/announce.activitystreams2.rabl'
|
||||
extends 'api/activitypub/activities/_show_status.activitystreams2.rabl'
|
||||
|
||||
object @status
|
||||
|
||||
node(:name) { |status| t('activitypub.activity.announce.name', account_name: account_name(status.account)) }
|
||||
node(:url) { |status| TagManager.instance.url_for(status) }
|
||||
node(:object) { |status| api_activitypub_status_url(status.reblog_of_id) }
|
@ -1,8 +0,0 @@
|
||||
extends 'activitypub/types/create.activitystreams2.rabl'
|
||||
extends 'api/activitypub/activities/_show_status.activitystreams2.rabl'
|
||||
|
||||
object @status
|
||||
|
||||
node(:name) { |status| t('activitypub.activity.create.name', account_name: account_name(status.account)) }
|
||||
node(:url) { |status| TagManager.instance.url_for(status) }
|
||||
node(:object) { |status| api_activitypub_note_url(status) }
|
@ -1,11 +0,0 @@
|
||||
extends 'activitypub/types/note.activitystreams2.rabl'
|
||||
|
||||
object @status
|
||||
|
||||
attributes :content
|
||||
|
||||
node(:name) { |status| status.content }
|
||||
node(:url) { |status| TagManager.instance.url_for(status) }
|
||||
node(:attributedTo) { |status| TagManager.instance.url_for(status.account) }
|
||||
node(:inReplyTo) { |status| api_activitypub_note_url(status.thread) } if @status.thread
|
||||
node(:published) { |status| status.created_at.to_time.xmlschema }
|
@ -1,12 +0,0 @@
|
||||
extends 'activitypub/types/ordered_collection.activitystreams2.rabl'
|
||||
|
||||
object @account
|
||||
|
||||
node(:totalItems) { @statuses.count }
|
||||
node(:current) { @first_page_url } if @first_page_url
|
||||
node(:first) { @first_page_url } if @first_page_url
|
||||
node(:last) { @last_page_url } if @last_page_url
|
||||
|
||||
node(:name) { |account| t('activitypub.outbox.name', account_name: account_name(account)) }
|
||||
node(:summary) { |account| t('activitypub.outbox.summary', account_name: account_name(account)) }
|
||||
node(:updated) { |account| (@statuses.empty? ? account.created_at.to_time : @statuses.first.updated_at.to_time).xmlschema }
|
@ -1,16 +0,0 @@
|
||||
extends 'activitypub/types/ordered_collection_page.activitystreams2.rabl'
|
||||
|
||||
object @account
|
||||
|
||||
node(:items) do
|
||||
@statuses.map { |status| api_activitypub_status_url(status) }
|
||||
end
|
||||
|
||||
node(:next) { @next_page_url } if @next_page_url
|
||||
node(:prev) { @prev_page_url } if @prev_page_url
|
||||
node(:current) { @first_page_url } if @first_page_url
|
||||
node(:first) { @first_page_url } if @first_page_url
|
||||
node(:last) { @last_page_url } if @last_page_url
|
||||
node(:partOf) { @part_of_url } if @part_of_url
|
||||
|
||||
node(:updated) { |account| (@statuses.empty? ? account.created_at.to_time : @statuses.first.updated_at.to_time).xmlschema }
|
@ -2,6 +2,9 @@
|
||||
= t('accounts.people_who_follow', name: display_name(@account))
|
||||
|
||||
- content_for :header_tags do
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
= render 'accounts/og', account: @account, url: account_followers_url(@account, only_path: false)
|
||||
|
||||
= render 'accounts/header', account: @account
|
||||
|
@ -2,6 +2,9 @@
|
||||
= t('accounts.people_followed_by', name: display_name(@account))
|
||||
|
||||
- content_for :header_tags do
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
= render 'accounts/og', account: @account, url: account_followers_url(@account, only_path: false)
|
||||
|
||||
= render 'accounts/header', account: @account
|
||||
|
@ -1,4 +1,5 @@
|
||||
- content_for :header_tags do
|
||||
%meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key}
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
|
||||
= javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous'
|
||||
|
@ -27,6 +27,7 @@
|
||||
= javascript_pack_tag 'features/notifications', integrity: true, crossorigin: 'anonymous', rel: 'preload', as: 'script'
|
||||
= javascript_pack_tag 'features/community_timeline', integrity: true, crossorigin: 'anonymous', rel: 'preload', as: 'script'
|
||||
= javascript_pack_tag 'features/public_timeline', integrity: true, crossorigin: 'anonymous', rel: 'preload', as: 'script'
|
||||
= javascript_pack_tag 'emojione_picker', integrity: true, crossorigin: 'anonymous', rel: 'preload', as: 'script'
|
||||
|
||||
= javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
|
||||
= csrf_meta_tags
|
||||
|
@ -2,6 +2,8 @@
|
||||
%html{ lang: I18n.locale }
|
||||
%head
|
||||
%meta{ charset: 'utf-8' }/
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
= stylesheet_pack_tag 'common', media: 'all'
|
||||
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
|
||||
= javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
|
||||
|
@ -40,6 +40,9 @@
|
||||
= ff.input :must_be_follower, as: :boolean, wrapper: :with_label
|
||||
= ff.input :must_be_following, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_noindex, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_delete_modal, as: :boolean, wrapper: :with_label
|
||||
|
@ -1,4 +1,7 @@
|
||||
- content_for :header_tags do
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
|
||||
%link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: account_stream_entry_url(@account, @stream_entry), format: 'json') }/
|
||||
|
||||
|
@ -3,14 +3,14 @@ object @account
|
||||
node(:subject) { @canonical_account_uri }
|
||||
|
||||
node(:aliases) do
|
||||
[TagManager.instance.url_for(@account), TagManager.instance.uri_for(@account)]
|
||||
[short_account_url(@account), account_url(@account)]
|
||||
end
|
||||
|
||||
node(:links) do
|
||||
[
|
||||
{ rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account) },
|
||||
{ rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: account_url(@account) },
|
||||
{ rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom') },
|
||||
{ rel: 'self', type: 'application/activity+json', href: TagManager.instance.url_for(@account) },
|
||||
{ rel: 'self', type: 'application/activity+json', href: account_url(@account) },
|
||||
{ rel: 'salmon', href: api_salmon_url(@account.id) },
|
||||
{ rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}" },
|
||||
{ rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_follow_url}?acct={uri}" },
|
||||
|
@ -1,10 +1,11 @@
|
||||
Nokogiri::XML::Builder.new do |xml|
|
||||
xml.XRD(xmlns: 'http://docs.oasis-open.org/ns/xri/xrd-1.0') do
|
||||
xml.Subject @canonical_account_uri
|
||||
xml.Alias TagManager.instance.url_for(@account)
|
||||
xml.Alias TagManager.instance.uri_for(@account)
|
||||
xml.Alias short_account_url(@account)
|
||||
xml.Alias account_url(@account)
|
||||
xml.Link(rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account))
|
||||
xml.Link(rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom'))
|
||||
xml.Link(rel: 'self', type: 'application/activity+json', href: account_url(@account))
|
||||
xml.Link(rel: 'salmon', href: api_salmon_url(@account.id))
|
||||
xml.Link(rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}")
|
||||
xml.Link(rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_follow_url}?acct={uri}")
|
||||
|
Reference in New Issue
Block a user