about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/about/show.html.haml7
-rw-r--r--app/views/accounts/show.activitystreams2.rabl9
-rw-r--r--app/views/accounts/show.html.haml3
-rw-r--r--app/views/activitypub/base.activitystreams2.rabl1
-rw-r--r--app/views/activitypub/intransient.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/announce.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/collection.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/create.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/note.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/ordered_collection.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/person.activitystreams2.rabl3
-rw-r--r--app/views/api/activitypub/activities/_show_status.activitystreams2.rabl4
-rw-r--r--app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl8
-rw-r--r--app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl8
-rw-r--r--app/views/api/activitypub/notes/show.activitystreams2.rabl11
-rw-r--r--app/views/api/activitypub/outbox/show.activitystreams2.rabl12
-rw-r--r--app/views/api/activitypub/outbox/show_page.activitystreams2.rabl16
-rw-r--r--app/views/follower_accounts/index.html.haml3
-rw-r--r--app/views/following_accounts/index.html.haml3
-rw-r--r--app/views/home/index.html.haml1
-rwxr-xr-xapp/views/layouts/application.html.haml1
-rw-r--r--app/views/layouts/embedded.html.haml2
-rw-r--r--app/views/settings/preferences/show.html.haml3
-rw-r--r--app/views/stream_entries/show.html.haml3
-rw-r--r--app/views/well_known/webfinger/show.json.rabl6
-rw-r--r--app/views/well_known/webfinger/show.xml.ruby5
27 files changed, 28 insertions, 102 deletions
diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml
index f75f87c99..fd468bba0 100644
--- a/app/views/about/show.html.haml
+++ b/app/views/about/show.html.haml
@@ -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' }/
diff --git a/app/views/accounts/show.activitystreams2.rabl b/app/views/accounts/show.activitystreams2.rabl
deleted file mode 100644
index 2c0a4ad3a..000000000
--- a/app/views/accounts/show.activitystreams2.rabl
+++ /dev/null
@@ -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) }
diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml
index a19049103..7ed634e5d 100644
--- a/app/views/accounts/show.html.haml
+++ b/app/views/accounts/show.html.haml
@@ -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') }/
 
diff --git a/app/views/activitypub/base.activitystreams2.rabl b/app/views/activitypub/base.activitystreams2.rabl
deleted file mode 100644
index c5e94997a..000000000
--- a/app/views/activitypub/base.activitystreams2.rabl
+++ /dev/null
@@ -1 +0,0 @@
-node(:'@context') { 'https://www.w3.org/ns/activitystreams' }
diff --git a/app/views/activitypub/intransient.activitystreams2.rabl b/app/views/activitypub/intransient.activitystreams2.rabl
deleted file mode 100644
index 968e451c2..000000000
--- a/app/views/activitypub/intransient.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/base.activitystreams2.rabl'
-
-node(:id) { request.original_url }
diff --git a/app/views/activitypub/types/announce.activitystreams2.rabl b/app/views/activitypub/types/announce.activitystreams2.rabl
deleted file mode 100644
index 4a29aa134..000000000
--- a/app/views/activitypub/types/announce.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Announce' }
diff --git a/app/views/activitypub/types/collection.activitystreams2.rabl b/app/views/activitypub/types/collection.activitystreams2.rabl
deleted file mode 100644
index cc0e532b7..000000000
--- a/app/views/activitypub/types/collection.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Collection' }
diff --git a/app/views/activitypub/types/create.activitystreams2.rabl b/app/views/activitypub/types/create.activitystreams2.rabl
deleted file mode 100644
index e41a056a7..000000000
--- a/app/views/activitypub/types/create.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Create' }
diff --git a/app/views/activitypub/types/note.activitystreams2.rabl b/app/views/activitypub/types/note.activitystreams2.rabl
deleted file mode 100644
index 39c74d4ba..000000000
--- a/app/views/activitypub/types/note.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Note' }
diff --git a/app/views/activitypub/types/ordered_collection.activitystreams2.rabl b/app/views/activitypub/types/ordered_collection.activitystreams2.rabl
deleted file mode 100644
index 2cda6f4d0..000000000
--- a/app/views/activitypub/types/ordered_collection.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/types/collection.activitystreams2.rabl'
-
-node(:type) { 'OrderedCollection' }
diff --git a/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl b/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
deleted file mode 100644
index 9937d11e9..000000000
--- a/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/types/ordered_collection.activitystreams2.rabl'
-
-node(:type) { 'OrderedCollectionPage' }
diff --git a/app/views/activitypub/types/person.activitystreams2.rabl b/app/views/activitypub/types/person.activitystreams2.rabl
deleted file mode 100644
index 487a60791..000000000
--- a/app/views/activitypub/types/person.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Person' }
diff --git a/app/views/api/activitypub/activities/_show_status.activitystreams2.rabl b/app/views/api/activitypub/activities/_show_status.activitystreams2.rabl
deleted file mode 100644
index 472bf5dbd..000000000
--- a/app/views/api/activitypub/activities/_show_status.activitystreams2.rabl
+++ /dev/null
@@ -1,4 +0,0 @@
-object @status
-
-node(:actor)     { |status| TagManager.instance.url_for(status.account) }
-node(:published) { |status| status.created_at.to_time.xmlschema }
\ No newline at end of file
diff --git a/app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl b/app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl
deleted file mode 100644
index 44ac1ba2f..000000000
--- a/app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl
+++ /dev/null
@@ -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) }
diff --git a/app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl b/app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl
deleted file mode 100644
index ff4d39eca..000000000
--- a/app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl
+++ /dev/null
@@ -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) }
diff --git a/app/views/api/activitypub/notes/show.activitystreams2.rabl b/app/views/api/activitypub/notes/show.activitystreams2.rabl
deleted file mode 100644
index d962f4438..000000000
--- a/app/views/api/activitypub/notes/show.activitystreams2.rabl
+++ /dev/null
@@ -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 }
diff --git a/app/views/api/activitypub/outbox/show.activitystreams2.rabl b/app/views/api/activitypub/outbox/show.activitystreams2.rabl
deleted file mode 100644
index 273b15e82..000000000
--- a/app/views/api/activitypub/outbox/show.activitystreams2.rabl
+++ /dev/null
@@ -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 }
diff --git a/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl b/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
deleted file mode 100644
index b6433ccf2..000000000
--- a/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
+++ /dev/null
@@ -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 }
diff --git a/app/views/follower_accounts/index.html.haml b/app/views/follower_accounts/index.html.haml
index 89c7f3a29..738b31638 100644
--- a/app/views/follower_accounts/index.html.haml
+++ b/app/views/follower_accounts/index.html.haml
@@ -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
diff --git a/app/views/following_accounts/index.html.haml b/app/views/following_accounts/index.html.haml
index 6f0de7590..9637c689f 100644
--- a/app/views/following_accounts/index.html.haml
+++ b/app/views/following_accounts/index.html.haml
@@ -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
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml
index 71dcb54c6..13ca9ea79 100644
--- a/app/views/home/index.html.haml
+++ b/app/views/home/index.html.haml
@@ -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'
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index ef97fb127..82b20810a 100755
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -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
diff --git a/app/views/layouts/embedded.html.haml b/app/views/layouts/embedded.html.haml
index 4826f32f7..46dab2d0f 100644
--- a/app/views/layouts/embedded.html.haml
+++ b/app/views/layouts/embedded.html.haml
@@ -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'
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index 56a261ab6..3b5d90942 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -41,6 +41,9 @@
       = 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
 
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index d01e82af8..80ea30eb1 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -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') }/
 
diff --git a/app/views/well_known/webfinger/show.json.rabl b/app/views/well_known/webfinger/show.json.rabl
index 123d1d11a..af11cd207 100644
--- a/app/views/well_known/webfinger/show.json.rabl
+++ b/app/views/well_known/webfinger/show.json.rabl
@@ -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}" },
diff --git a/app/views/well_known/webfinger/show.xml.ruby b/app/views/well_known/webfinger/show.xml.ruby
index fc0ab5b84..844742d68 100644
--- a/app/views/well_known/webfinger/show.xml.ruby
+++ b/app/views/well_known/webfinger/show.xml.ruby
@@ -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}")