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/more.html.haml4
-rw-r--r--app/views/about/show.html.haml8
-rw-r--r--app/views/about/terms.en.html.haml2
-rw-r--r--app/views/about/terms.no.html.haml2
-rw-r--r--app/views/accounts/show.html.haml4
-rw-r--r--app/views/admin/accounts/show.html.haml5
-rw-r--r--app/views/admin/domain_blocks/index.html.haml14
-rw-r--r--app/views/admin/domain_blocks/new.html.haml14
-rw-r--r--app/views/admin/domain_blocks/show.html.haml12
-rw-r--r--app/views/admin/reports/show.html.haml2
-rw-r--r--app/views/api/oembed/show.json.rabl2
-rw-r--r--app/views/api/v1/instances/show.rabl2
-rw-r--r--app/views/api/v1/statuses/_media.rabl4
-rw-r--r--app/views/home/initial_state.json.rabl9
-rwxr-xr-xapp/views/layouts/application.html.haml3
-rw-r--r--app/views/layouts/mailer.text.erb2
-rw-r--r--app/views/layouts/public.html.haml2
-rw-r--r--app/views/settings/imports/show.html.haml2
-rw-r--r--app/views/settings/preferences/show.html.haml2
-rw-r--r--app/views/shared/_landing_strip.html.haml2
-rw-r--r--app/views/stream_entries/show.html.haml2
-rw-r--r--app/views/user_mailer/confirmation_instructions.ja.html.erb8
-rw-r--r--app/views/user_mailer/confirmation_instructions.ja.text.erb8
-rw-r--r--app/views/user_mailer/reset_password_instructions.ja.html.erb2
-rw-r--r--app/views/user_mailer/reset_password_instructions.ja.text.erb2
25 files changed, 71 insertions, 48 deletions
diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml
index 418c98247..84b29912c 100644
--- a/app/views/about/more.html.haml
+++ b/app/views/about/more.html.haml
@@ -1,11 +1,11 @@
 - content_for :page_title do
-  #{Rails.configuration.x.local_domain}
+  = site_hostname
 
 .wrapper.thicc
   .sidebar-layout
     .main
       .panel
-        %h2= Rails.configuration.x.local_domain
+        %h2= site_hostname
 
         - unless @instance_presenter.site_description.blank?
           %p= @instance_presenter.site_description.html_safe
diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml
index 39686b531..49ad03557 100644
--- a/app/views/about/show.html.haml
+++ b/app/views/about/show.html.haml
@@ -2,13 +2,13 @@
   = javascript_include_tag 'application_public', integrity: true
 
 - content_for :page_title do
-  = Rails.configuration.x.local_domain
+  = site_hostname
 
 - content_for :header_tags do
   %meta{ property: 'og:site_name', content: site_title }/
   %meta{ property: 'og:type', content: 'website' }/
-  %meta{ property: 'og:title', content: Rails.configuration.x.local_domain }/
-  %meta{ property: 'og:description', content: strip_tags(@instance_presenter.site_description.blank? ? t('about.about_mastodon') : @instance_presenter.site_description) }/
+  %meta{ property: 'og:title', content: site_hostname }/
+  %meta{ property: 'og:description', content: strip_tags(@instance_presenter.site_description.presence || t('about.about_mastodon')) }/
   %meta{ property: 'og:image', content: asset_url('mastodon_small.jpg') }/
   %meta{ property: 'og:image:width', content: '400' }/
   %meta{ property: 'og:image:height', content: '400' }/
@@ -72,7 +72,7 @@
           = t 'about.features.api'
 
   - unless @instance_presenter.site_description.blank?
-    %h3= t('about.description_headline', domain: Rails.configuration.x.local_domain)
+    %h3= t('about.description_headline', domain: site_hostname)
     %p= @instance_presenter.site_description.html_safe
 
   .actions
diff --git a/app/views/about/terms.en.html.haml b/app/views/about/terms.en.html.haml
index e1766ca16..7e0fb94c2 100644
--- a/app/views/about/terms.en.html.haml
+++ b/app/views/about/terms.en.html.haml
@@ -1,5 +1,5 @@
 - content_for :page_title do
-  #{Rails.configuration.x.local_domain} Terms of Service and Privacy Policy
+  #{site_hostname} Terms of Service and Privacy Policy
 
 .wrapper
   %h2 Privacy Policy
diff --git a/app/views/about/terms.no.html.haml b/app/views/about/terms.no.html.haml
index 32ec57ed1..46f62950d 100644
--- a/app/views/about/terms.no.html.haml
+++ b/app/views/about/terms.no.html.haml
@@ -1,5 +1,5 @@
 - content_for :page_title do
-  #{Rails.configuration.x.local_domain} Personvern og villkår for bruk av nettstedet
+  #{site_hostname} Personvern og villkår for bruk av nettstedet
 
 .wrapper
   %h2 Personvernserklæring
diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml
index 9a70fd16f..b01f3c4e3 100644
--- a/app/views/accounts/show.html.haml
+++ b/app/views/accounts/show.html.haml
@@ -7,7 +7,7 @@
 
   %meta{ property: 'og:site_name', content: site_title }/
   %meta{ property: 'og:type', content: 'profile' }/
-  %meta{ property: 'og:title', content: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/
+  %meta{ property: 'og:title', content: "#{@account.username} on #{site_hostname}" }/
   %meta{ property: 'og:description', content: @account.note }/
   %meta{ property: 'og:image', content: full_asset_url(@account.avatar.url(:original)) }/
   %meta{ property: 'og:image:width', content: '120' }/
@@ -18,7 +18,7 @@
   = render partial: 'shared/landing_strip', locals: { account: @account }
 
 .h-feed
-  %data.p-name{ value: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/
+  %data.p-name{ value: "#{@account.username} on #{site_hostname}" }/
 
   = render 'header', account: @account
 
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 07dcc7f46..7609868e6 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -61,8 +61,9 @@
         = surround '(', ')' do
           = number_to_human_size @account.media_attachments.sum('file_file_size')
 
-%div{ style: 'float: right' }
-  = link_to t('admin.accounts.reset_password'), admin_account_reset_path(@account.id), method: :create, class: 'button'
+- if @account.local?
+  %div{ style: 'float: right' }
+    = link_to t('admin.accounts.reset_password'), admin_account_reset_path(@account.id), method: :create, class: 'button'
 
 %div{ style: 'float: left' }
   - if @account.silenced?
diff --git a/app/views/admin/domain_blocks/index.html.haml b/app/views/admin/domain_blocks/index.html.haml
index da9a07bbc..bdef4294e 100644
--- a/app/views/admin/domain_blocks/index.html.haml
+++ b/app/views/admin/domain_blocks/index.html.haml
@@ -1,24 +1,24 @@
 - content_for :page_title do
-  = t('admin.domain_block.title')
+  = t('admin.domain_blocks.title')
 
 %table.table
   %thead
     %tr
-      %th= t('admin.domain_block.domain')
-      %th= t('admin.domain_block.severity')
-      %th= t('admin.domain_block.reject_media')
+      %th= t('admin.domain_blocks.domain')
+      %th= t('admin.domain_blocks.severity')
+      %th= t('admin.domain_blocks.reject_media')
       %th
   %tbody
     - @blocks.each do |block|
       %tr
         %td
           %samp= block.domain
-        %td= t("admin.domain_block.severities.#{block.severity}")
+        %td= t("admin.domain_blocks.severities.#{block.severity}")
         %td
           - if block.reject_media? || block.suspend?
             %i.fa.fa-check
         %td
-          = table_link_to 'undo', t('admin.domain_block.undo'), admin_domain_block_path(block)
+          = table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(block)
 
 = paginate @blocks
-= link_to t('admin.domain_block.add_new'), new_admin_domain_block_path, class: 'button'
+= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
diff --git a/app/views/admin/domain_blocks/new.html.haml b/app/views/admin/domain_blocks/new.html.haml
index 603faeb55..38fa90169 100644
--- a/app/views/admin/domain_blocks/new.html.haml
+++ b/app/views/admin/domain_blocks/new.html.haml
@@ -1,17 +1,17 @@
 - content_for :page_title do
-  = t('admin.domain_block.new.title')
+  = t('.title')
 
 = simple_form_for @domain_block, url: admin_domain_blocks_path do |f|
   = render 'shared/error_messages', object: @domain_block
 
-  %p.hint= t('admin.domain_block.new.hint')
+  %p.hint= t('.hint')
 
-  = f.input :domain, placeholder: t('admin.domain_block.domain')
-  = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| I18n.t("admin.domain_block.new.severity.#{type}") }
+  = f.input :domain, placeholder: t('admin.domain_blocks.domain')
+  = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t(".severity.#{type}") }
 
-  %p.hint= t('admin.domain_block.new.severity.desc_html')
+  %p.hint= t('.severity.desc_html')
 
-  = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_block.reject_media'), hint: I18n.t('admin.domain_block.reject_media_hint')
+  = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint')
 
   .actions
-    = f.button :button, t('admin.domain_block.new.create'), type: :submit
+    = f.button :button, t('.create'), type: :submit
diff --git a/app/views/admin/domain_blocks/show.html.haml b/app/views/admin/domain_blocks/show.html.haml
index bf9011c52..70dfef9b2 100644
--- a/app/views/admin/domain_blocks/show.html.haml
+++ b/app/views/admin/domain_blocks/show.html.haml
@@ -1,9 +1,15 @@
 - content_for :page_title do
-  = t('admin.domain_block.show.title', domain: @domain_block.domain)
+  = t('admin.domain_blocks.show.title', domain: @domain_block.domain)
 
 = simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :delete do |f|
 
-  = f.input :retroactive, as: :boolean, wrapper: :with_label, label: I18n.t("admin.domain_block.show.retroactive.#{@domain_block.severity}"), hint: I18n.t('admin.domain_block.show.affected_accounts', count: Account.where(domain: @domain_block.domain).count)
+  = f.input :retroactive,
+    as: :boolean,
+    wrapper: :with_label,
+    label: t(".retroactive.#{@domain_block.severity}"),
+    hint: t(:affected_accounts,
+      scope: [:admin, :domain_blocks, :show],
+      count: @domain_block.accounts_count)
 
   .actions
-    = f.button :button, t('admin.domain_block.show.undo'), type: :submit
+    = f.button :button, t('.undo'), type: :submit
diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml
index 5391d99a8..aa144170d 100644
--- a/app/views/admin/reports/show.html.haml
+++ b/app/views/admin/reports/show.html.haml
@@ -12,7 +12,7 @@
 %p
   %strong= t('admin.reports.comment.label')
   \:
-  = @report.comment.presence || t('reports.comment.none')
+  = @report.comment.presence || t('admin.reports.comment.none')
 
 - unless @report.statuses.empty?
   %hr/
diff --git a/app/views/api/oembed/show.json.rabl b/app/views/api/oembed/show.json.rabl
index 311c02dad..11dcec538 100644
--- a/app/views/api/oembed/show.json.rabl
+++ b/app/views/api/oembed/show.json.rabl
@@ -6,7 +6,7 @@ node(:version) { '1.0' }
 node(:title, &:title)
 node(:author_name) { |entry| entry.account.display_name.blank? ? entry.account.username : entry.account.display_name }
 node(:author_url) { |entry| account_url(entry.account) }
-node(:provider_name) { Rails.configuration.x.local_domain }
+node(:provider_name) { site_hostname }
 node(:provider_url) { root_url }
 node(:cache_age) { 86_400 }
 node(:html) { |entry| "<iframe src=\"#{embed_account_stream_entry_url(entry.account, entry)}\" style=\"width: 100%; overflow: hidden\" frameborder=\"0\" width=\"#{@width}\" height=\"#{@height}\" scrolling=\"no\"></iframe>" }
diff --git a/app/views/api/v1/instances/show.rabl b/app/views/api/v1/instances/show.rabl
index 88eb08a9e..f5598fde3 100644
--- a/app/views/api/v1/instances/show.rabl
+++ b/app/views/api/v1/instances/show.rabl
@@ -1,6 +1,6 @@
 object false
 
-node(:uri)         { Rails.configuration.x.local_domain }
+node(:uri)         { site_hostname }
 node(:title)       { Setting.site_title }
 node(:description) { Setting.site_description }
 node(:email)       { Setting.site_contact_email }
diff --git a/app/views/api/v1/statuses/_media.rabl b/app/views/api/v1/statuses/_media.rabl
index 80d80ea05..2f56c6d07 100644
--- a/app/views/api/v1/statuses/_media.rabl
+++ b/app/views/api/v1/statuses/_media.rabl
@@ -1,5 +1,5 @@
 attributes :id, :remote_url, :type
 
-node(:url)         { |media| media.file.blank? ? media.remote_url : full_asset_url(media.file.url(:original)) }
-node(:preview_url) { |media| media.file.blank? ? media.remote_url : full_asset_url(media.file.url(:small)) }
+node(:url)         { |media| full_asset_url(media.file.url(:original)) }
+node(:preview_url) { |media| full_asset_url(media.file.url(:small)) }
 node(:text_url)    { |media| media.local? ? medium_url(media) : nil }
diff --git a/app/views/home/initial_state.json.rabl b/app/views/home/initial_state.json.rabl
index 9f94e6141..104049387 100644
--- a/app/views/home/initial_state.json.rabl
+++ b/app/views/home/initial_state.json.rabl
@@ -5,7 +5,9 @@ node(:meta) do
     streaming_api_base_url: @streaming_api_base_url,
     access_token: @token,
     locale: I18n.locale,
+    domain: site_hostname,
     me: current_account.id,
+    admin: @admin.try(:id),
     boost_modal: current_account.user.setting_boost_modal,
   }
 end
@@ -18,9 +20,10 @@ node(:compose) do
 end
 
 node(:accounts) do
-  {
-    current_account.id => partial('api/v1/accounts/show', object: current_account),
-  }
+  store = {}
+  store[current_account.id] = partial('api/v1/accounts/show', object: current_account)
+  store[@admin.id] = partial('api/v1/accounts/show', object: @admin) unless @admin.nil?
+  store
 end
 
 node(:settings) { @web_settings }
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index a27c3de95..688deaebd 100755
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -6,6 +6,7 @@
     %meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge'}/
 
     %link{:rel => "apple-touch-icon", :sizes => "180x180", :href => "/apple-touch-icon.png"}/
+    %link{:rel => "mask-icon", :href => "/mask-icon.svg", :color => "#2B90D9"}/
     %link{:rel => "manifest", :href => "/manifest.json"}/
     %meta{:name => "msapplication-config", :content => "/browserconfig.xml"}/
     %meta{:name => "theme-color", :content => "#282c37"}/
@@ -13,7 +14,7 @@
 
     %title<
       - if content_for?(:page_title)
-        = yield(:page_title)
+        = yield(:page_title).strip
         = ' - '
       = site_title
 
diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb
index 21bf444c3..cdb284de8 100644
--- a/app/views/layouts/mailer.text.erb
+++ b/app/views/layouts/mailer.text.erb
@@ -1,5 +1,5 @@
 <%= yield %>
 ---
 
-<%= t('application_mailer.signature', instance: Rails.configuration.x.local_domain) %>
+<%= t('application_mailer.signature', instance: site_hostname) %>
 <%= t('application_mailer.settings', link: settings_preferences_url) %>
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index fdde0a681..556102f53 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -4,7 +4,7 @@
 - content_for :content do
   .container= yield
   .footer
-    %span.domain= link_to Rails.configuration.x.local_domain, root_path
+    %span.domain= link_to site_hostname, root_path
     %span.powered-by
       = t('generic.powered_by', link: link_to('Mastodon', 'https://github.com/tootsuite/mastodon')).html_safe
 
diff --git a/app/views/settings/imports/show.html.haml b/app/views/settings/imports/show.html.haml
index 8502913dc..991dd4e94 100644
--- a/app/views/settings/imports/show.html.haml
+++ b/app/views/settings/imports/show.html.haml
@@ -4,7 +4,7 @@
 %p.hint= t('imports.preface')
 
 = simple_form_for @import, url: settings_import_path do |f|
-  = f.input :type, collection: Import.types.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| I18n.t("imports.types.#{type}") }
+  = f.input :type, collection: Import.types.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| I18n.t("imports.types.#{type}") }, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
   = f.input :data, wrapper: :with_label, hint: t('simple_form.hints.imports.data')
 
   .actions
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index e819429b6..4f4326763 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -7,7 +7,7 @@
   .fields-group
     = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }
 
-    = f.input :setting_default_privacy, collection: Status.visibilities.keys - ['direct'], wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| I18n.t("statuses.visibilities.#{visibility}") }, required: false
+    = f.input :setting_default_privacy, collection: Status.visibilities.keys - ['direct'], wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| I18n.t("statuses.visibilities.#{visibility}") }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
 
   .fields-group
     = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
diff --git a/app/views/shared/_landing_strip.html.haml b/app/views/shared/_landing_strip.html.haml
index 3536c5ca8..02e694418 100644
--- a/app/views/shared/_landing_strip.html.haml
+++ b/app/views/shared/_landing_strip.html.haml
@@ -1,5 +1,5 @@
 .landing-strip
   = t('landing_strip_html',
     name: content_tag(:span, display_name(account), class: :emojify),
-    domain: Rails.configuration.x.local_domain,
+    domain: site_hostname,
     sign_up_path: new_user_registration_path)
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index dea5e9d40..31efa26c4 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -4,7 +4,7 @@
 
   %meta{ property: 'og:site_name', content: site_title }/
   %meta{ property: 'og:type', content: 'article' }/
-  %meta{ property: 'og:title', content: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/
+  %meta{ property: 'og:title', content: "#{@account.username} on #{site_hostname}" }/
 
   = render 'stream_entries/og_description', activity: @stream_entry.activity
   = render 'stream_entries/og_image', activity: @stream_entry.activity, account: @account
diff --git a/app/views/user_mailer/confirmation_instructions.ja.html.erb b/app/views/user_mailer/confirmation_instructions.ja.html.erb
index bbb44b2cc..1232f94b4 100644
--- a/app/views/user_mailer/confirmation_instructions.ja.html.erb
+++ b/app/views/user_mailer/confirmation_instructions.ja.html.erb
@@ -1,5 +1,11 @@
 <p>ようこそ<%= @resource.email %>さん</p>
 
-<p>以下のリンクをクリックしてMastodonアカウントのメールアドレスを確認してください</p>
+<p><%= @instance %>にアカウントが作成されました。</p>
+
+<p>以下のリンクをクリックしてMastodonアカウントのメールアドレスを確認してください。</p>
 
 <p><%= link_to 'メールアドレスの確認', confirmation_url(@resource, confirmation_token: @token) %></p>
+
+<p>また、インスタンスの<%= link_to '利用規約', terms_url %>についてもご確認ください。</p>
+
+<p><%= @instance %> チーム</p>
diff --git a/app/views/user_mailer/confirmation_instructions.ja.text.erb b/app/views/user_mailer/confirmation_instructions.ja.text.erb
index ad8abee2d..99868ba8a 100644
--- a/app/views/user_mailer/confirmation_instructions.ja.text.erb
+++ b/app/views/user_mailer/confirmation_instructions.ja.text.erb
@@ -1,5 +1,11 @@
 ようこそ<%= @resource.email %>さん
 
-以下のリンクをクリックしてMastodonアカウントのメールアドレスを確認してください
+<%= @instance %>にアカウントが作成されました。
+
+以下のリンクをクリックしてMastodonアカウントのメールアドレスを確認してください。
 
 <%= confirmation_url(@resource, confirmation_token: @token) %>
+
+また、インスタンスの<%= link_to '利用規約', terms_url %>についてもご確認ください。
+
+<%= @instance %> チーム
diff --git a/app/views/user_mailer/reset_password_instructions.ja.html.erb b/app/views/user_mailer/reset_password_instructions.ja.html.erb
index 156758ef5..d0d7203f4 100644
--- a/app/views/user_mailer/reset_password_instructions.ja.html.erb
+++ b/app/views/user_mailer/reset_password_instructions.ja.html.erb
@@ -4,5 +4,5 @@
 
 <p><%= link_to 'パスワードを変更', edit_password_url(@resource, reset_password_token: @token) %></p>
 
-<p>このメールに見に覚えのない場合は無視してください。</p>
+<p>このメールに身に覚えのない場合は無視してください。</p>
 <p>上記のリンクにアクセスし、変更をしない限りパスワードは変更されません。</p>
diff --git a/app/views/user_mailer/reset_password_instructions.ja.text.erb b/app/views/user_mailer/reset_password_instructions.ja.text.erb
index 5fb0eba04..9ed607b58 100644
--- a/app/views/user_mailer/reset_password_instructions.ja.text.erb
+++ b/app/views/user_mailer/reset_password_instructions.ja.text.erb
@@ -4,5 +4,5 @@ Mastodonアカウントのパスワードの変更がリクエストされまし
 
 <%= edit_password_url(@resource, reset_password_token: @token) %>
 
-このメールに見に覚えのない場合は無視してください。
+このメールに身に覚えのない場合は無視してください。
 上記のリンクにアクセスし、変更をしない限りパスワードは変更されません。