From b00cc4b9bdf24fb13f9034d2ac96f8f8acec6a26 Mon Sep 17 00:00:00 2001 From: Quent-in Date: Thu, 7 Sep 2017 22:07:03 +0200 Subject: i10n OC / FR update Pinned toots (#4842) * Added column.pins New strings * Added column.pins * Update confirmation_instructions.oc.html.erb * Update confirmation_instructions.oc.text.erb * Update password_change.oc.html.erb * Update password_change.oc.text.erb * Update reset_password_instructions.oc.html.erb * Update reset_password_instructions.oc.text.erb * Update confirmation_instructions.oc.html.erb * Update confirmation_instructions.oc.text.erb --- app/views/user_mailer/confirmation_instructions.oc.html.erb | 4 ++-- app/views/user_mailer/confirmation_instructions.oc.text.erb | 4 ++-- app/views/user_mailer/password_change.oc.html.erb | 4 ++-- app/views/user_mailer/password_change.oc.text.erb | 4 ++-- app/views/user_mailer/reset_password_instructions.oc.html.erb | 2 +- app/views/user_mailer/reset_password_instructions.oc.text.erb | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'app/views') diff --git a/app/views/user_mailer/confirmation_instructions.oc.html.erb b/app/views/user_mailer/confirmation_instructions.oc.html.erb index 9e9732bd8..ed1428a55 100644 --- a/app/views/user_mailer/confirmation_instructions.oc.html.erb +++ b/app/views/user_mailer/confirmation_instructions.oc.html.erb @@ -1,8 +1,8 @@ -

Bonjorn <%= @resource.email %> !

+

Bonjorn <%= @resource.email %> ! 

Venètz de vos crear un compte sus <%= @instance %> e vos mercegem :)

-

Per confirmar vòstre inscripcion, mercés de clicar sul ligam seguent :
+

Per confirmar vòstre inscripcion, mercés de clicar sul ligam seguent : 
<%= link_to 'Confirmar mon compte', confirmation_url(@resource, confirmation_token: @token) %>

Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de l’aisina.

diff --git a/app/views/user_mailer/confirmation_instructions.oc.text.erb b/app/views/user_mailer/confirmation_instructions.oc.text.erb index ff1abf62d..444d296ce 100644 --- a/app/views/user_mailer/confirmation_instructions.oc.text.erb +++ b/app/views/user_mailer/confirmation_instructions.oc.text.erb @@ -1,8 +1,8 @@ -Bonjorn <%= @resource.email %> ! +Bonjorn <%= @resource.email %> !  Venètz de vos crear un compte sus <%= @instance %> e vos mercegem :) -er confirmar vòstre inscripcion, mercés de clicar sul ligam seguent : +er confirmar vòstre inscripcion, mercés de clicar sul ligam seguent :  <%= link_to 'Confirmar mon compte', confirmation_url(@resource, confirmation_token: @token) %> Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de l’aisina. diff --git a/app/views/user_mailer/password_change.oc.html.erb b/app/views/user_mailer/password_change.oc.html.erb index a6b506f5e..476db9536 100644 --- a/app/views/user_mailer/password_change.oc.html.erb +++ b/app/views/user_mailer/password_change.oc.html.erb @@ -1,3 +1,3 @@ -

Bonjorn <%= @resource.email %> !

+

Bonjorn <%= @resource.email %> ! 

-

Vos contactem per vos avisar que vòstre senhal per Mastodon es ben estat cambiat.

+

Vos contactem per vos avisar qu’avèm ben cambiat vòstre senhal Mastodon.

diff --git a/app/views/user_mailer/password_change.oc.text.erb b/app/views/user_mailer/password_change.oc.text.erb index 1caebde69..e6caa045c 100644 --- a/app/views/user_mailer/password_change.oc.text.erb +++ b/app/views/user_mailer/password_change.oc.text.erb @@ -1,3 +1,3 @@ -Bonjorn <%= @resource.email %> ! +Bonjorn <%= @resource.email %> !  -Vos contactem per vos avisar que vòstre senhal per Mastodon es ben estat cambiat. +Vos contactem per vos avisar qu’avèm ben cambiat vòstre senhal Mastodon. diff --git a/app/views/user_mailer/reset_password_instructions.oc.html.erb b/app/views/user_mailer/reset_password_instructions.oc.html.erb index acf2c0abd..7363ee4b6 100644 --- a/app/views/user_mailer/reset_password_instructions.oc.html.erb +++ b/app/views/user_mailer/reset_password_instructions.oc.html.erb @@ -1,4 +1,4 @@ -

Bonjorn <%= @resource.email %> !

+

Bonjorn <%= @resource.email %> ! 

Qualqu’un a demandat una reĩnicializacion de vòstre senhal per Mastodon. Podètz realizar la reĩnicializacion en clicant sul ligam çai-jos.

diff --git a/app/views/user_mailer/reset_password_instructions.oc.text.erb b/app/views/user_mailer/reset_password_instructions.oc.text.erb index 211974cc2..a95a1ae8c 100644 --- a/app/views/user_mailer/reset_password_instructions.oc.text.erb +++ b/app/views/user_mailer/reset_password_instructions.oc.text.erb @@ -1,4 +1,4 @@ -Bonjorn <%= @resource.email %> ! +Bonjorn <%= @resource.email %> !  Qualqu’un a demandat una reĩnicializacion de vòstre senhal per Mastodon. Podètz realizar la reĩnicializacion en clicant sul ligam çai-jos.

-- cgit From 1caf11ddcc029d9e7735ab3b90607ab2d6973034 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 8 Sep 2017 12:32:22 +0200 Subject: Fix language filter codes (#4841) * Fix language filter codes CLD3 returns BCP-47 language identifier, filter settings expect identifiers in the ISO 639-1 format. Convert between formats, and exclude duplicate languages from filter choices (zh-CN->zh) * Fix zh name --- Gemfile | 1 + Gemfile.lock | 2 ++ app/helpers/settings_helper.rb | 5 +++++ app/lib/language_detector.rb | 11 ++++++++++- app/views/settings/preferences/show.html.haml | 2 +- spec/helpers/settings_helper_spec.rb | 4 ++-- 6 files changed, 21 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/Gemfile b/Gemfile index 486e72cc4..637bf53ee 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,7 @@ gem 'addressable', '~> 2.5' gem 'bootsnap' gem 'browser' gem 'charlock_holmes', '~> 0.7.5' +gem 'iso-639' gem 'cld3', '~> 3.1' gem 'devise', '~> 4.2' gem 'devise-two-factor', '~> 3.0' diff --git a/Gemfile.lock b/Gemfile.lock index ef99e0d7b..ddb97dd94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -225,6 +225,7 @@ GEM terminal-table (>= 1.5.1) idn-ruby (0.1.0) ipaddress (0.8.3) + iso-639 (0.2.8) jmespath (1.3.1) json (2.1.0) json-ld (2.1.5) @@ -560,6 +561,7 @@ DEPENDENCIES httplog (~> 0.99) i18n-tasks (~> 0.9) idn-ruby + iso-639 json-ld-preloaded (~> 2.2.1) kaminari (~> 1.0) letter_opener (~> 1.4) diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index af950aa63..369a45680 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -30,6 +30,7 @@ module SettingsHelper th: 'ภาษาไทย', tr: 'Türkçe', uk: 'Українська', + zh: '中文', 'zh-CN': '简体中文', 'zh-HK': '繁體中文(香港)', 'zh-TW': '繁體中文(臺灣)', @@ -39,6 +40,10 @@ module SettingsHelper HUMAN_LOCALES[locale] end + def filterable_languages + I18n.available_locales.map { |locale| locale.to_s.split('-').first.to_sym }.uniq + end + def hash_to_object(hash) HashObject.new(hash) end diff --git a/app/lib/language_detector.rb b/app/lib/language_detector.rb index cc7509fdc..1d9932b52 100644 --- a/app/lib/language_detector.rb +++ b/app/lib/language_detector.rb @@ -20,7 +20,16 @@ class LanguageDetector private def detected_language_code - result.language.to_sym if detected_language_reliable? + iso6391(result.language).to_sym if detected_language_reliable? + end + + def iso6391(bcp47) + iso639 = bcp47.split('-').first + + # CLD3 returns grandfathered language code for Hebrew + return 'he' if iso639 == 'iw' + + ISO_639.find(iso639).alpha2 end def result diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index fae6090c8..f42f92508 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -13,7 +13,7 @@ selected: I18n.locale = f.input :filtered_languages, - collection: I18n.available_locales, + collection: filterable_languages, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb index 5a51e0ef1..092c37583 100644 --- a/spec/helpers/settings_helper_spec.rb +++ b/spec/helpers/settings_helper_spec.rb @@ -4,10 +4,10 @@ require 'rails_helper' describe SettingsHelper do describe 'the HUMAN_LOCALES constant' do - it 'has the same number of keys as I18n locales exist' do + it 'includes all I18n locales' do options = I18n.available_locales - expect(described_class::HUMAN_LOCALES.keys).to eq(options) + expect(described_class::HUMAN_LOCALES.keys).to include(*options) end end -- cgit From 3c45d3963a21812f00318353be90010df636bd0d Mon Sep 17 00:00:00 2001 From: Lynx Kotoura Date: Sat, 9 Sep 2017 09:26:58 +0900 Subject: Scrollable tables in settings pages (#4857) * Scrollable tables in settings pages * Add space before curly brace --- app/javascript/styles/admin.scss | 8 +- app/javascript/styles/tables.scss | 19 ++- app/views/admin/accounts/_card.html.haml | 31 ++--- app/views/admin/accounts/index.html.haml | 23 ++-- app/views/admin/accounts/show.html.haml | 136 ++++++++++----------- app/views/admin/domain_blocks/index.html.haml | 19 +-- app/views/admin/instances/index.html.haml | 15 +-- app/views/admin/reports/index.html.haml | 25 ++-- app/views/admin/subscriptions/index.html.haml | 21 ++-- app/views/auth/registrations/_sessions.html.haml | 47 +++---- .../oauth/authorized_applications/index.html.haml | 39 +++--- app/views/settings/applications/index.html.haml | 25 ++-- app/views/settings/applications/show.html.haml | 33 ++--- app/views/settings/exports/show.html.haml | 37 +++--- app/views/settings/follower_domains/show.html.haml | 27 ++-- 15 files changed, 259 insertions(+), 246 deletions(-) (limited to 'app/views') diff --git a/app/javascript/styles/admin.scss b/app/javascript/styles/admin.scss index b86de75b6..fa7859e38 100644 --- a/app/javascript/styles/admin.scss +++ b/app/javascript/styles/admin.scss @@ -190,11 +190,15 @@ .filters { display: flex; - margin-bottom: 20px; + flex-wrap: wrap; .filter-subset { flex: 0 0 auto; - margin-right: 40px; + margin: 0 40px 10px 0; + + &:last-child { + margin-bottom: 20px; + } ul { margin-top: 5px; diff --git a/app/javascript/styles/tables.scss b/app/javascript/styles/tables.scss index f6e57e196..ad46f5f9f 100644 --- a/app/javascript/styles/tables.scss +++ b/app/javascript/styles/tables.scss @@ -3,7 +3,6 @@ max-width: 100%; border-spacing: 0; border-collapse: collapse; - margin-bottom: 20px; th, td { @@ -43,19 +42,17 @@ font-weight: 500; } - &.inline-table { - td, - th { - padding: 8px 2px; - } - - & > tbody > tr:nth-child(odd) > td, - & > tbody > tr:nth-child(odd) > th { - background: transparent; - } + &.inline-table > tbody > tr:nth-child(odd) > td, + &.inline-table > tbody > tr:nth-child(odd) > th { + background: transparent; } } +.table-wrapper { + overflow: auto; + margin-bottom: 20px; +} + samp { font-family: 'mastodon-font-monospace', monospace; } diff --git a/app/views/admin/accounts/_card.html.haml b/app/views/admin/accounts/_card.html.haml index bb33582eb..2f5955011 100644 --- a/app/views/admin/accounts/_card.html.haml +++ b/app/views/admin/accounts/_card.html.haml @@ -1,16 +1,17 @@ -%table.table - %tbody - %tr - %td= t('admin.accounts.show.created_reports') - %td= link_to pluralize(account.reports.count, t('admin.accounts.show.report')), admin_reports_path(account_id: account.id) - %tr - %td= t('admin.accounts.show.targeted_reports') - %td= link_to pluralize(account.targeted_reports.count, t('admin.accounts.show.report')), admin_reports_path(target_account_id: account.id) - - if account.silenced? || account.suspended? +.table-wrapper + %table.table + %tbody %tr - %td= t('admin.accounts.moderation.title') - %td - - if account.silenced? - %p= t('admin.accounts.moderation.silenced') - - if account.suspended? - %p= t('admin.accounts.moderation.suspended') + %td= t('admin.accounts.show.created_reports') + %td= link_to pluralize(account.reports.count, t('admin.accounts.show.report')), admin_reports_path(account_id: account.id) + %tr + %td= t('admin.accounts.show.targeted_reports') + %td= link_to pluralize(account.targeted_reports.count, t('admin.accounts.show.report')), admin_reports_path(target_account_id: account.id) + - if account.silenced? || account.suspended? + %tr + %td= t('admin.accounts.moderation.title') + %td + - if account.silenced? + %p= t('admin.accounts.moderation.silenced') + - if account.suspended? + %p= t('admin.accounts.moderation.suspended') diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml index 1f36aeb31..1b56a3a31 100644 --- a/app/views/admin/accounts/index.html.haml +++ b/app/views/admin/accounts/index.html.haml @@ -50,16 +50,17 @@ %button= t('admin.accounts.search') = link_to t('admin.accounts.reset'), admin_accounts_path, class: 'button negative' -%table.table - %thead - %tr - %th= t('admin.accounts.username') - %th= t('admin.accounts.domain') - %th= t('admin.accounts.protocol') - %th= t('admin.accounts.confirmed') - %th= fa_icon 'paper-plane-o' - %th - %tbody - = render @accounts +.table-wrapper + %table.table + %thead + %tr + %th= t('admin.accounts.username') + %th= t('admin.accounts.domain') + %th= t('admin.accounts.protocol') + %th= t('admin.accounts.confirmed') + %th= fa_icon 'paper-plane-o' + %th + %tbody + = render @accounts = paginate @accounts diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index dc2f16cc9..89355281a 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -1,86 +1,86 @@ - content_for :page_title do = @account.acct -%table.table - %tbody - %tr - %th= t('admin.accounts.username') - %td= @account.username - %tr - %th= t('admin.accounts.domain') - %td= @account.domain - %tr - %th= t('admin.accounts.display_name') - %td= @account.display_name - - - if @account.local? - %tr - %th= t('admin.accounts.email') - %td= @account.user_email +.table-wrapper + %table.table + %tbody %tr - %th= t('admin.accounts.most_recent_ip') - %td= @account.user_current_sign_in_ip - %tr - %th= t('admin.accounts.most_recent_activity') - %td - - if @account.user_current_sign_in_at - %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) } - = l @account.user_current_sign_in_at - - else - Never - - else + %th= t('admin.accounts.username') + %td= @account.username %tr - %th= t('admin.accounts.profile_url') - %td= link_to @account.url, @account.url + %th= t('admin.accounts.domain') + %td= @account.domain %tr - %th= t('admin.accounts.protocol') - %td= @account.protocol.humanize + %th= t('admin.accounts.display_name') + %td= @account.display_name - - if @account.ostatus? + - if @account.local? %tr - %th= t('admin.accounts.feed_url') - %td= link_to @account.remote_url, @account.remote_url + %th= t('admin.accounts.email') + %td= @account.user_email %tr - %th= t('admin.accounts.push_subscription_expires') + %th= t('admin.accounts.most_recent_ip') + %td= @account.user_current_sign_in_ip + %tr + %th= t('admin.accounts.most_recent_activity') %td - - if @account.subscribed? - %time.formatted{ datetime: @account.subscription_expires_at.iso8601, title: l(@account.subscription_expires_at) } - = l @account.subscription_expires_at + - if @account.user_current_sign_in_at + %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) } + = l @account.user_current_sign_in_at - else - = t('admin.accounts.not_subscribed') - %tr - %th= t('admin.accounts.salmon_url') - %td= link_to @account.salmon_url, @account.salmon_url - - elsif @account.activitypub? + Never + - else %tr - %th= t('admin.accounts.inbox_url') - %td= link_to @account.inbox_url, @account.inbox_url + %th= t('admin.accounts.profile_url') + %td= link_to @account.url, @account.url %tr - %th= t('admin.accounts.outbox_url') - %td= link_to @account.outbox_url, @account.outbox_url + %th= t('admin.accounts.protocol') + %td= @account.protocol.humanize - %tr - %th= t('admin.accounts.follows') - %td= @account.following_count - %tr - %th= t('admin.accounts.followers') - %td= @account.followers_count - %tr - %th= t('admin.accounts.statuses') - %td= link_to @account.statuses_count, admin_account_statuses_path(@account.id) - %tr - %th= t('admin.accounts.media_attachments') - %td - = link_to @account.media_attachments.count, admin_account_statuses_path(@account.id, { media: true }) - = surround '(', ')' do - = number_to_human_size @account.media_attachments.sum('file_file_size') - %tr - %th= t('.created_reports') - %td= link_to pluralize(@account.reports.count, t('.report')), admin_reports_path(account_id: @account.id) - %tr - %th= t('.targeted_reports') - %td= link_to pluralize(@account.targeted_reports.count, t('.report')), admin_reports_path(target_account_id: @account.id) + - if @account.ostatus? + %tr + %th= t('admin.accounts.feed_url') + %td= link_to @account.remote_url, @account.remote_url + %tr + %th= t('admin.accounts.push_subscription_expires') + %td + - if @account.subscribed? + %time.formatted{ datetime: @account.subscription_expires_at.iso8601, title: l(@account.subscription_expires_at) } + = l @account.subscription_expires_at + - else + = t('admin.accounts.not_subscribed') + %tr + %th= t('admin.accounts.salmon_url') + %td= link_to @account.salmon_url, @account.salmon_url + - elsif @account.activitypub? + %tr + %th= t('admin.accounts.inbox_url') + %td= link_to @account.inbox_url, @account.inbox_url + %tr + %th= t('admin.accounts.outbox_url') + %td= link_to @account.outbox_url, @account.outbox_url + %tr + %th= t('admin.accounts.follows') + %td= @account.following_count + %tr + %th= t('admin.accounts.followers') + %td= @account.followers_count + %tr + %th= t('admin.accounts.statuses') + %td= link_to @account.statuses_count, admin_account_statuses_path(@account.id) + %tr + %th= t('admin.accounts.media_attachments') + %td + = link_to @account.media_attachments.count, admin_account_statuses_path(@account.id, { media: true }) + = surround '(', ')' do + = number_to_human_size @account.media_attachments.sum('file_file_size') + %tr + %th= t('.created_reports') + %td= link_to pluralize(@account.reports.count, t('.report')), admin_reports_path(account_id: @account.id) + %tr + %th= t('.targeted_reports') + %td= link_to pluralize(@account.targeted_reports.count, t('.report')), admin_reports_path(target_account_id: @account.id) %div{ style: 'float: right' } - if @account.local? diff --git a/app/views/admin/domain_blocks/index.html.haml b/app/views/admin/domain_blocks/index.html.haml index 5ae9fec53..42b8ca53f 100644 --- a/app/views/admin/domain_blocks/index.html.haml +++ b/app/views/admin/domain_blocks/index.html.haml @@ -1,15 +1,16 @@ - content_for :page_title do = t('admin.domain_blocks.title') -%table.table - %thead - %tr - %th= t('admin.domain_blocks.domain') - %th= t('admin.domain_blocks.severity') - %th= t('admin.domain_blocks.reject_media') - %th - %tbody - = render @domain_blocks +.table-wrapper + %table.table + %thead + %tr + %th= t('admin.domain_blocks.domain') + %th= t('admin.domain_blocks.severity') + %th= t('admin.domain_blocks.reject_media') + %th + %tbody + = render @domain_blocks = paginate @domain_blocks = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml index be21d6bf7..edbd3b217 100644 --- a/app/views/admin/instances/index.html.haml +++ b/app/views/admin/instances/index.html.haml @@ -1,12 +1,13 @@ - content_for :page_title do = t('admin.instances.title') -%table.table - %thead - %tr - %th= t('admin.instances.domain_name') - %th= t('admin.instances.account_count') - %tbody - = render @instances +.table-wrapper + %table.table + %thead + %tr + %th= t('admin.instances.domain_name') + %th= t('admin.instances.account_count') + %tbody + = render @instances = paginate paginated_instances diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index f1c4a93c4..577c68a86 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -10,17 +10,18 @@ = form_tag do - %table.table - %thead - %tr - -# %th - %th= t('admin.reports.id') - %th= t('admin.reports.target') - %th= t('admin.reports.reported_by') - %th= t('admin.reports.comment.label') - %th= t('admin.reports.report_contents') - %th - %tbody - = render @reports + .table-wrapper + %table.table + %thead + %tr + -# %th + %th= t('admin.reports.id') + %th= t('admin.reports.target') + %th= t('admin.reports.reported_by') + %th= t('admin.reports.comment.label') + %th= t('admin.reports.report_contents') + %th + %tbody + = render @reports = paginate @reports diff --git a/app/views/admin/subscriptions/index.html.haml b/app/views/admin/subscriptions/index.html.haml index 21b3238a6..83704c8ee 100644 --- a/app/views/admin/subscriptions/index.html.haml +++ b/app/views/admin/subscriptions/index.html.haml @@ -1,15 +1,16 @@ - content_for :page_title do = t('admin.subscriptions.title') -%table.table - %thead - %tr - %th= t('admin.subscriptions.topic') - %th= t('admin.subscriptions.callback_url') - %th= t('admin.subscriptions.confirmed') - %th= t('admin.subscriptions.expires_in') - %th= t('admin.subscriptions.last_delivery') - %tbody - = render @subscriptions +.table-wrapper + %table.table + %thead + %tr + %th= t('admin.subscriptions.topic') + %th= t('admin.subscriptions.callback_url') + %th= t('admin.subscriptions.confirmed') + %th= t('admin.subscriptions.expires_in') + %th= t('admin.subscriptions.last_delivery') + %tbody + = render @subscriptions = paginate @subscriptions diff --git a/app/views/auth/registrations/_sessions.html.haml b/app/views/auth/registrations/_sessions.html.haml index 7ac578bb1..c1e9764b3 100644 --- a/app/views/auth/registrations/_sessions.html.haml +++ b/app/views/auth/registrations/_sessions.html.haml @@ -1,28 +1,29 @@ %h6= t 'sessions.title' %p.muted-hint= t 'sessions.explanation' -%table.table.inline-table - %thead - %tr - %th= t 'sessions.browser' - %th= t 'sessions.ip' - %th= t 'sessions.activity' - %td - %tbody - - @sessions.each do |session| +.table-wrapper + %table.table.inline-table + %thead %tr + %th= t 'sessions.browser' + %th= t 'sessions.ip' + %th= t 'sessions.activity' %td - %span{ title: session.user_agent }< - = fa_icon "#{session_device_icon(session)} fw", 'aria-label' => session_device_icon(session) - = ' ' - = t 'sessions.description', browser: t("sessions.browsers.#{session.browser}"), platform: t("sessions.platforms.#{session.platform}") - %td - %samp= session.ip - %td - - if current_session.session_id == session.session_id - = t 'sessions.current_session' - - else - %time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at) - %td - - if current_session.session_id != session.session_id - = table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete + %tbody + - @sessions.each do |session| + %tr + %td + %span{ title: session.user_agent }< + = fa_icon "#{session_device_icon(session)} fw", 'aria-label' => session_device_icon(session) + = ' ' + = t 'sessions.description', browser: t("sessions.browsers.#{session.browser}"), platform: t("sessions.platforms.#{session.platform}") + %td + %samp= session.ip + %td + - if current_session.session_id == session.session_id + = t 'sessions.current_session' + - else + %time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at) + %td + - if current_session.session_id != session.session_id + = table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete diff --git a/app/views/oauth/authorized_applications/index.html.haml b/app/views/oauth/authorized_applications/index.html.haml index ba0c08495..19af5f55d 100644 --- a/app/views/oauth/authorized_applications/index.html.haml +++ b/app/views/oauth/authorized_applications/index.html.haml @@ -1,23 +1,24 @@ - content_for :page_title do = t('doorkeeper.authorized_applications.index.title') -%table.table - %thead - %tr - %th= t('doorkeeper.authorized_applications.index.application') - %th= t('doorkeeper.authorized_applications.index.scopes') - %th= t('doorkeeper.authorized_applications.index.created_at') - %th - %tbody - - @applications.each do |application| +.table-wrapper + %table.table + %thead %tr - %td - - if application.website.blank? - = application.name - - else - = link_to application.name, application.website, target: '_blank', rel: 'noopener' - %th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('
') - %td= l application.created_at - %td - - unless application.superapp? - = table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') } + %th= t('doorkeeper.authorized_applications.index.application') + %th= t('doorkeeper.authorized_applications.index.scopes') + %th= t('doorkeeper.authorized_applications.index.created_at') + %th + %tbody + - @applications.each do |application| + %tr + %td + - if application.website.blank? + = application.name + - else + = link_to application.name, application.website, target: '_blank', rel: 'noopener' + %th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('
') + %td= l application.created_at + %td + - unless application.superapp? + = table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') } diff --git a/app/views/settings/applications/index.html.haml b/app/views/settings/applications/index.html.haml index eea550388..919472c2e 100644 --- a/app/views/settings/applications/index.html.haml +++ b/app/views/settings/applications/index.html.haml @@ -1,19 +1,20 @@ - content_for :page_title do = t('doorkeeper.applications.index.title') -%table.table - %thead - %tr - %th= t('doorkeeper.applications.index.application') - %th= t('doorkeeper.applications.index.scopes') - %th - %tbody - - @applications.each do |application| +.table-wrapper + %table.table + %thead %tr - %td= link_to application.name, settings_application_path(application) - %th= application.scopes - %td - = table_link_to 'times', t('doorkeeper.applications.index.delete'), settings_application_path(application), method: :delete, data: { confirm: t('doorkeeper.applications.confirmations.destroy') } + %th= t('doorkeeper.applications.index.application') + %th= t('doorkeeper.applications.index.scopes') + %th + %tbody + - @applications.each do |application| + %tr + %td= link_to application.name, settings_application_path(application) + %th= application.scopes + %td + = table_link_to 'times', t('doorkeeper.applications.index.delete'), settings_application_path(application), method: :delete, data: { confirm: t('doorkeeper.applications.confirmations.destroy') } = paginate @applications = link_to t('doorkeeper.applications.index.new'), new_settings_application_path, class: 'button' diff --git a/app/views/settings/applications/show.html.haml b/app/views/settings/applications/show.html.haml index 4d8555111..12baed088 100644 --- a/app/views/settings/applications/show.html.haml +++ b/app/views/settings/applications/show.html.haml @@ -3,22 +3,23 @@ %p.hint= t('applications.warning') -%table.table - %tbody - %tr - %th= t('doorkeeper.applications.show.application_id') - %td - %code= @application.uid - %tr - %th= t('doorkeeper.applications.show.secret') - %td - %code= @application.secret - %tr - %th{ rowspan: 2}= t('applications.your_token') - %td - %code= current_user.token_for_app(@application).token - %tr - %td= table_link_to 'refresh', t('applications.regenerate_token'), regenerate_settings_application_path(@application), method: :post +.table-wrapper + %table.table + %tbody + %tr + %th= t('doorkeeper.applications.show.application_id') + %td + %code= @application.uid + %tr + %th= t('doorkeeper.applications.show.secret') + %td + %code= @application.secret + %tr + %th{ rowspan: 2}= t('applications.your_token') + %td + %code= current_user.token_for_app(@application).token + %tr + %td= table_link_to 'refresh', t('applications.regenerate_token'), regenerate_settings_application_path(@application), method: :post %hr/ diff --git a/app/views/settings/exports/show.html.haml b/app/views/settings/exports/show.html.haml index f2f6f9556..e0df1c480 100644 --- a/app/views/settings/exports/show.html.haml +++ b/app/views/settings/exports/show.html.haml @@ -1,21 +1,22 @@ - content_for :page_title do = t('settings.export') -%table.table - %tbody - %tr - %th= t('exports.storage') - %td= number_to_human_size @export.total_storage - %td - %tr - %th= t('exports.follows') - %td= @export.total_follows - %td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv) - %tr - %th= t('exports.blocks') - %td= @export.total_blocks - %td= table_link_to 'download', t('exports.csv'), settings_exports_blocks_path(format: :csv) - %tr - %th= t('exports.mutes') - %td= @export.total_mutes - %td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv) +.table-wrapper + %table.table + %tbody + %tr + %th= t('exports.storage') + %td= number_to_human_size @export.total_storage + %td + %tr + %th= t('exports.follows') + %td= @export.total_follows + %td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv) + %tr + %th= t('exports.blocks') + %td= @export.total_blocks + %td= table_link_to 'download', t('exports.csv'), settings_exports_blocks_path(format: :csv) + %tr + %th= t('exports.mutes') + %td= @export.total_mutes + %td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv) diff --git a/app/views/settings/follower_domains/show.html.haml b/app/views/settings/follower_domains/show.html.haml index dad2770f1..f1687d4d2 100644 --- a/app/views/settings/follower_domains/show.html.haml +++ b/app/views/settings/follower_domains/show.html.haml @@ -12,20 +12,21 @@ %p= t('followers.explanation_html') %p= t('followers.true_privacy_html') - %table.table - %thead - %tr - %th - %th= t('followers.domain') - %th= t('followers.followers_count') - %tbody - - @domains.each do |domain| + .table-wrapper + %table.table + %thead %tr - %td - = check_box_tag 'select[]', domain.domain, false, disabled: !@account.locked? unless domain.domain.nil? - %td - %samp= domain.domain.presence || Rails.configuration.x.local_domain - %td= number_with_delimiter domain.accounts_from_domain + %th + %th= t('followers.domain') + %th= t('followers.followers_count') + %tbody + - @domains.each do |domain| + %tr + %td + = check_box_tag 'select[]', domain.domain, false, disabled: !@account.locked? unless domain.domain.nil? + %td + %samp= domain.domain.presence || Rails.configuration.x.local_domain + %td= number_with_delimiter domain.accounts_from_domain .action-pagination .actions -- cgit