diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/accounts/_bio.html.haml | 2 | ||||
-rw-r--r-- | app/views/accounts/_header.html.haml | 10 | ||||
-rw-r--r-- | app/views/accounts/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/relays/_relay.html.haml | 10 | ||||
-rw-r--r-- | app/views/admin/reports/_status.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/settings/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/suspensions/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/auth/shared/_links.html.haml | 2 | ||||
-rwxr-xr-x | app/views/layouts/application.html.haml | 9 | ||||
-rw-r--r-- | app/views/layouts/public.html.haml | 2 | ||||
-rw-r--r-- | app/views/settings/exports/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/stream_entries/_detailed_status.html.haml | 2 | ||||
-rw-r--r-- | app/views/stream_entries/_simple_status.html.haml | 2 |
13 files changed, 30 insertions, 26 deletions
diff --git a/app/views/accounts/_bio.html.haml b/app/views/accounts/_bio.html.haml index c9a4d8f1b..4e674beff 100644 --- a/app/views/accounts/_bio.html.haml +++ b/app/views/accounts/_bio.html.haml @@ -3,7 +3,7 @@ .account__header__fields - account.fields.each do |field| %dl - %dt.emojify{ title: field.name }= field.name + %dt.emojify{ title: field.name }= Formatter.instance.format_field(account, field.name, custom_emojify: true) %dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value, custom_emojify: true) = account_badge(account) diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml index caf03bd7c..f09beff98 100644 --- a/app/views/accounts/_header.html.haml +++ b/app/views/accounts/_header.html.haml @@ -16,17 +16,17 @@ .counter{ class: active_nav_class(short_account_url(account)) } = link_to short_account_url(account), class: 'u-url u-uid', title: number_with_delimiter(account.statuses_count) do %span.counter-number= number_to_human account.statuses_count, strip_insignificant_zeros: true - %span.counter-label= t('accounts.posts') + %span.counter-label= t('accounts.posts', count: account.statuses_count) .counter{ class: active_nav_class(account_following_index_url(account)) } = link_to account_following_index_url(account), title: number_with_delimiter(account.following_count) do %span.counter-number= number_to_human account.following_count, strip_insignificant_zeros: true - %span.counter-label= t('accounts.following') + %span.counter-label= t('accounts.following', count: account.following_count) .counter{ class: active_nav_class(account_followers_url(account)) } = link_to account_followers_url(account), title: number_with_delimiter(account.followers_count) do %span.counter-number= number_to_human account.followers_count, strip_insignificant_zeros: true - %span.counter-label= t('accounts.followers') + %span.counter-label= t('accounts.followers', count: account.followers_count) .spacer .public-account-header__tabs__tabs__buttons = account_action_button(account) @@ -37,7 +37,7 @@ .public-account-header__extra__links = link_to account_following_index_url(account) do %strong= number_to_human account.following_count, strip_insignificant_zeros: true - = t('accounts.following') + = t('accounts.following', count: account.following_count) = link_to account_followers_url(account) do %strong= number_to_human account.followers_count, strip_insignificant_zeros: true - = t('accounts.followers') + = t('accounts.followers', count: account.followers_count) diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index e398fc29b..b825b82cb 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -29,7 +29,7 @@ %data.p-name{ value: "#{@account.username} on #{site_hostname}" }/ .account__section-headline - = active_link_to t('accounts.posts'), short_account_url(@account) + = active_link_to t('accounts.posts_tab_heading'), short_account_url(@account) = active_link_to t('accounts.posts_with_replies'), short_account_with_replies_url(@account) = active_link_to t('accounts.media'), short_account_media_url(@account) diff --git a/app/views/admin/relays/_relay.html.haml b/app/views/admin/relays/_relay.html.haml index d974c80a6..667821894 100644 --- a/app/views/admin/relays/_relay.html.haml +++ b/app/views/admin/relays/_relay.html.haml @@ -2,20 +2,24 @@ %td %samp= relay.inbox_url %td - - if relay.enabled? + - if relay.accepted? %span.positive-hint = fa_icon('check') = ' ' = t 'admin.relays.enabled' + - elsif relay.pending? + = fa_icon('hourglass') + = ' ' + = t 'admin.relays.pending' - else %span.negative-hint = fa_icon('times') = ' ' = t 'admin.relays.disabled' %td - - if relay.enabled? + - if relay.accepted? = table_link_to 'power-off', t('admin.relays.disable'), disable_admin_relay_path(relay), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } - - else + - elsif !relay.pending? = table_link_to 'power-off', t('admin.relays.enable'), enable_admin_relay_path(relay), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } = table_link_to 'times', t('admin.relays.delete'), admin_relay_path(relay), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') } diff --git a/app/views/admin/reports/_status.html.haml b/app/views/admin/reports/_status.html.haml index 5b410ec84..4d557b071 100644 --- a/app/views/admin/reports/_status.html.haml +++ b/app/views/admin/reports/_status.html.haml @@ -14,7 +14,7 @@ - unless status.proper.media_attachments.empty? - if status.proper.media_attachments.first.video? - video = status.proper.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.proper.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true + = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.proper.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true, alt: video.description - else = react_component :media_gallery, height: 343, sensitive: status.proper.sensitive? && !current_account&.user&.setting_display_sensitive_media, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml index fda6b00f4..abe7ecf32 100644 --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@ -15,6 +15,7 @@ %hr/ .fields-group + = f.input :flavour, collection: Themes.instance.flavours, label_method: lambda { |flavour| I18n.t("flavours.#{flavour}.name", default: flavour) }, wrapper: :with_label, include_blank: false = f.input :thumbnail, as: :file, wrapper: :with_block_label, label: t('admin.settings.thumbnail.title'), hint: t('admin.settings.thumbnail.desc_html') = f.input :hero, as: :file, wrapper: :with_block_label, label: t('admin.settings.hero.title'), hint: t('admin.settings.hero.desc_html') @@ -48,7 +49,7 @@ .fields-group = f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 } = f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 } - + = f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }, label: t('admin.settings.custom_css.title'), hint: t('admin.settings.custom_css.desc_html') %hr/ .fields-group diff --git a/app/views/admin/suspensions/new.html.haml b/app/views/admin/suspensions/new.html.haml index 5ffbbbe46..f03ecacc3 100644 --- a/app/views/admin/suspensions/new.html.haml +++ b/app/views/admin/suspensions/new.html.haml @@ -8,13 +8,13 @@ %ul %li.negative-hint = number_to_human @account.statuses_count, strip_insignificant_zeros: true - = t('accounts.posts') + = t('accounts.posts', count: @account.statuses_count) %li.negative-hint = number_to_human @account.following_count, strip_insignificant_zeros: true - = t('accounts.following') + = t('accounts.following', count: @account.following_count) %li.negative-hint = number_to_human @account.followers_count, strip_insignificant_zeros: true - = t('accounts.followers') + = t('accounts.followers', count: @account.followers_count) %p.hint= t('admin.suspensions.hint_html', value: content_tag(:code, @account.acct)) diff --git a/app/views/auth/shared/_links.html.haml b/app/views/auth/shared/_links.html.haml index 08b385092..516c625a6 100644 --- a/app/views/auth/shared/_links.html.haml +++ b/app/views/auth/shared/_links.html.haml @@ -3,7 +3,7 @@ %li= link_to t('auth.login'), new_session_path(resource_name) - if devise_mapping.registerable? && controller_name != 'registrations' - %li= link_to t('auth.register'), new_registration_path(resource_name) + %li= link_to t('auth.register'), open_registrations? ? new_registration_path(resource_name) : 'https://joinmastodon.org/#getting-started' - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %li= link_to t('auth.forgot_password'), new_password_path(resource_name) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 9ede598b3..36b4e9cae 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -21,15 +21,14 @@ = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous' = csrf_meta_tags + - if Setting.custom_css.present? + = stylesheet_link_tag custom_css_path, media: 'all' + = yield :header_tags -# These must come after :header_tags to ensure our initial state has been defined. = render partial: 'layouts/theme', object: @core = render partial: 'layouts/theme', object: @theme - - body_classes ||= @body_classes || '' - - body_classes += ' system-font' if current_account&.user&.setting_system_font_ui - - body_classes += current_account&.user&.setting_reduce_motion ? ' reduce-motion' : ' no-reduce-motion' - - %body{ class: add_rtl_body_class(body_classes) } + %body{ class: body_classes } = content_for?(:content) ? yield(:content) : yield diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 24911bb1e..bfa385f58 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -11,7 +11,7 @@ = link_to t('settings.back'), root_url, class: 'nav-link nav-button webapp-btn' - else = link_to t('auth.login'), new_user_session_path, class: 'webapp-btn nav-link nav-button' - = link_to t('auth.register'), new_user_registration_path, class: 'webapp-btn nav-link nav-button' + = link_to t('auth.register'), open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started', class: 'webapp-btn nav-link nav-button' .container= yield diff --git a/app/views/settings/exports/show.html.haml b/app/views/settings/exports/show.html.haml index ef2d2b894..792dccd9e 100644 --- a/app/views/settings/exports/show.html.haml +++ b/app/views/settings/exports/show.html.haml @@ -9,7 +9,7 @@ %td= number_to_human_size @export.total_storage %td %tr - %th= t('accounts.statuses') + %th= t('accounts.statuses', count: @export.total_statuses) %td= number_with_delimiter @export.total_statuses %td %tr @@ -17,7 +17,7 @@ %td= number_with_delimiter @export.total_follows %td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv) %tr - %th= t('accounts.followers') + %th= t('accounts.followers', count: @export.total_followers) %td= number_with_delimiter @export.total_followers %td %tr diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index a7c767816..7843005c1 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -21,7 +21,7 @@ - if !status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 670, height: 380, detailed: true, inline: true + = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 670, height: 380, detailed: true, inline: true, alt: video.description - else = react_component :media_gallery, height: 380, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } - elsif status.preview_cards.first diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index 1d61684ab..effd4826e 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -25,7 +25,7 @@ - unless status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true + = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true, alt: video.description - else = react_component :media_gallery, height: 343, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } |