Gab Social. All are welcome.
This commit is contained in:
18
app/views/settings/applications/_fields.html.haml
Normal file
18
app/views/settings/applications/_fields.html.haml
Normal file
@@ -0,0 +1,18 @@
|
||||
.fields-group
|
||||
= f.input :name, wrapper: :with_label, label: t('activerecord.attributes.doorkeeper/application.name')
|
||||
|
||||
.fields-group
|
||||
= f.input :website, wrapper: :with_label, label: t('activerecord.attributes.doorkeeper/application.website')
|
||||
|
||||
.fields-group
|
||||
= f.input :redirect_uri, wrapper: :with_block_label, label: t('activerecord.attributes.doorkeeper/application.redirect_uri'), hint: t('doorkeeper.applications.help.redirect_uri')
|
||||
|
||||
%p.hint= t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: Doorkeeper.configuration.native_redirect_uri)
|
||||
|
||||
.field-group
|
||||
.input.with_block_label
|
||||
%label= t('activerecord.attributes.doorkeeper/application.scopes')
|
||||
%span.hint= t('simple_form.hints.defaults.scopes')
|
||||
|
||||
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |k, v|
|
||||
= f.input :scopes, label: false, hint: false, collection: v.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |scope| safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
20
app/views/settings/applications/index.html.haml
Normal file
20
app/views/settings/applications/index.html.haml
Normal file
@@ -0,0 +1,20 @@
|
||||
- content_for :page_title do
|
||||
= t('doorkeeper.applications.index.title')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%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'
|
||||
8
app/views/settings/applications/new.html.haml
Normal file
8
app/views/settings/applications/new.html.haml
Normal file
@@ -0,0 +1,8 @@
|
||||
- content_for :page_title do
|
||||
= t('doorkeeper.applications.new.title')
|
||||
|
||||
= simple_form_for @application, url: settings_applications_path do |f|
|
||||
= render 'fields', f: f
|
||||
|
||||
.actions
|
||||
= f.button :button, t('doorkeeper.applications.buttons.submit'), type: :submit
|
||||
31
app/views/settings/applications/show.html.haml
Normal file
31
app/views/settings/applications/show.html.haml
Normal file
@@ -0,0 +1,31 @@
|
||||
- content_for :page_title do
|
||||
= t('doorkeeper.applications.show.title', name: @application.name)
|
||||
|
||||
%p.hint= t('applications.warning')
|
||||
|
||||
.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/
|
||||
|
||||
= simple_form_for @application, url: settings_application_path(@application), method: :put do |f|
|
||||
= render 'fields', f: f
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
%tr
|
||||
%td= transaction.id
|
||||
%td= transaction.created_at
|
||||
%td= transaction.payment_type
|
||||
%td= transaction.provider_type
|
||||
%td= number_to_currency(transaction.amount / 100)
|
||||
%td
|
||||
= table_link_to 'download', t('billing.transactions.download_invoice'), "test"
|
||||
22
app/views/settings/billing/transactions/index.html.haml
Normal file
22
app/views/settings/billing/transactions/index.html.haml
Normal file
@@ -0,0 +1,22 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.transactions')
|
||||
|
||||
%p= t('billing.transactions.explanation_html')
|
||||
%p= "You are PRO and your subscription ends at " + current_account.pro_expires_at.to_s if current_account.is_pro
|
||||
|
||||
- unless @transactions.empty?
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('billing.transactions.id')
|
||||
%th= t('billing.transactions.date')
|
||||
%th= t('billing.transactions.type')
|
||||
%th= t('billing.transactions.provider_type')
|
||||
%th= t('billing.transactions.amount')
|
||||
%th= t('billing.transactions.status')
|
||||
%th
|
||||
%tbody
|
||||
= render partial: 'settings/billing/transactions/transaction', collection: @transactions, as: :transaction
|
||||
4
app/views/settings/billing/upgrade/index.html.haml
Normal file
4
app/views/settings/billing/upgrade/index.html.haml
Normal file
@@ -0,0 +1,4 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.upgrade')
|
||||
|
||||
%p= t('billing.upgrade.explanation_html')
|
||||
16
app/views/settings/deletes/show.html.haml
Normal file
16
app/views/settings/deletes/show.html.haml
Normal file
@@ -0,0 +1,16 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.delete')
|
||||
|
||||
= simple_form_for @confirmation, url: settings_delete_path, method: :delete do |f|
|
||||
.warning
|
||||
%strong
|
||||
= fa_icon('warning')
|
||||
= t('deletes.warning_title')
|
||||
= t('deletes.warning_html')
|
||||
|
||||
%p.hint= t('deletes.description_html')
|
||||
|
||||
= f.input :password, placeholder: t('simple_form.labels.defaults.current_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.current_password'), :autocomplete => 'off' }, hint: t('deletes.confirm_password')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('deletes.proceed'), type: :submit, class: 'negative'
|
||||
61
app/views/settings/exports/show.html.haml
Normal file
61
app/views/settings/exports/show.html.haml
Normal file
@@ -0,0 +1,61 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.export')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%tbody
|
||||
%tr
|
||||
%th= t('exports.storage')
|
||||
%td= number_to_human_size @export.total_storage
|
||||
%td
|
||||
%tr
|
||||
%th= t('accounts.posts', count: @export.total_statuses)
|
||||
%td= number_with_delimiter @export.total_statuses
|
||||
%td
|
||||
%tr
|
||||
%th= t('exports.follows')
|
||||
%td= number_with_delimiter @export.total_follows
|
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv)
|
||||
%tr
|
||||
%th= t('exports.lists')
|
||||
%td= number_with_delimiter @export.total_lists
|
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_lists_path(format: :csv)
|
||||
%tr
|
||||
%th= t('accounts.followers', count: @export.total_followers)
|
||||
%td= number_with_delimiter @export.total_followers
|
||||
%td
|
||||
%tr
|
||||
%th= t('exports.blocks')
|
||||
%td= number_with_delimiter @export.total_blocks
|
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_blocks_path(format: :csv)
|
||||
%tr
|
||||
%th= t('exports.mutes')
|
||||
%td= number_with_delimiter @export.total_mutes
|
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv)
|
||||
%tr
|
||||
%th= t('exports.domain_blocks')
|
||||
%td= number_with_delimiter @export.total_domain_blocks
|
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_domain_blocks_path(format: :csv)
|
||||
|
||||
%p.muted-hint= t('exports.archive_takeout.hint_html')
|
||||
|
||||
- if policy(:backup).create?
|
||||
%p= link_to t('exports.archive_takeout.request'), settings_export_path, class: 'button', method: :post
|
||||
|
||||
- unless @backups.empty?
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('exports.archive_takeout.date')
|
||||
%th= t('exports.archive_takeout.size')
|
||||
%th
|
||||
%tbody
|
||||
- @backups.each do |backup|
|
||||
%tr
|
||||
%td= l backup.created_at
|
||||
- if backup.processed?
|
||||
%td= number_to_human_size backup.dump_file_size
|
||||
%td= table_link_to 'download', t('exports.archive_takeout.download'), backup.dump.url
|
||||
- else
|
||||
%td{ colspan: 2 }= t('exports.archive_takeout.in_progress')
|
||||
27
app/views/settings/featured_tags/index.html.haml
Normal file
27
app/views/settings/featured_tags/index.html.haml
Normal file
@@ -0,0 +1,27 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.featured_tags')
|
||||
|
||||
= simple_form_for @featured_tag, url: settings_featured_tags_path do |f|
|
||||
= render 'shared/error_messages', object: @featured_tag
|
||||
|
||||
.fields-group
|
||||
= f.input :name, wrapper: :with_block_label, hint: safe_join([t('simple_form.hints.featured_tag.name'), safe_join(@most_used_tags.map { |tag| link_to("##{tag.name}", settings_featured_tags_path(featured_tag: { name: tag.name }), method: :post) }, ', ')], ' ')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('featured_tags.add_new'), type: :submit
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- @featured_tags.each do |featured_tag|
|
||||
.directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil }
|
||||
%div
|
||||
%h4
|
||||
= fa_icon 'hashtag'
|
||||
= featured_tag.name
|
||||
%small
|
||||
- if featured_tag.last_status_at.nil?
|
||||
= t('accounts.nothing_here')
|
||||
- else
|
||||
%time{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at
|
||||
= table_link_to 'trash', t('filters.index.delete'), settings_featured_tag_path(featured_tag), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
.trends__item__current= number_to_human featured_tag.statuses_count, strip_insignificant_zeros: true
|
||||
20
app/views/settings/identity_proofs/_proof.html.haml
Normal file
20
app/views/settings/identity_proofs/_proof.html.haml
Normal file
@@ -0,0 +1,20 @@
|
||||
%tr
|
||||
%td
|
||||
= link_to proof.badge.profile_url, class: 'name-tag' do
|
||||
= image_tag proof.badge.avatar_url, width: 15, height: 15, alt: '', class: 'avatar'
|
||||
%span.username
|
||||
= proof.provider_username
|
||||
%span= "(#{proof.provider.capitalize})"
|
||||
|
||||
%td
|
||||
- if proof.live?
|
||||
%span.positive-hint
|
||||
= fa_icon 'check-circle fw'
|
||||
= t('identity_proofs.active')
|
||||
- else
|
||||
%span.negative-hint
|
||||
= fa_icon 'times-circle fw'
|
||||
= t('identity_proofs.inactive')
|
||||
|
||||
%td
|
||||
= table_link_to 'external-link', t('identity_proofs.view_proof'), proof.badge.proof_url if proof.badge.proof_url
|
||||
17
app/views/settings/identity_proofs/index.html.haml
Normal file
17
app/views/settings/identity_proofs/index.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.identity_proofs')
|
||||
|
||||
%p= t('identity_proofs.explanation_html')
|
||||
|
||||
- unless @proofs.empty?
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('identity_proofs.identity')
|
||||
%th= t('identity_proofs.status')
|
||||
%th
|
||||
%tbody
|
||||
= render partial: 'settings/identity_proofs/proof', collection: @proofs, as: :proof
|
||||
36
app/views/settings/identity_proofs/new.html.haml
Normal file
36
app/views/settings/identity_proofs/new.html.haml
Normal file
@@ -0,0 +1,36 @@
|
||||
- content_for :page_title do
|
||||
= t('identity_proofs.authorize_connection_prompt')
|
||||
|
||||
.form-container
|
||||
.oauth-prompt
|
||||
%h2= t('identity_proofs.authorize_connection_prompt')
|
||||
|
||||
= simple_form_for @proof, url: settings_identity_proofs_url, html: { method: :post } do |f|
|
||||
= f.input :provider, as: :hidden
|
||||
= f.input :provider_username, as: :hidden
|
||||
= f.input :token, as: :hidden
|
||||
|
||||
= hidden_field_tag :user_agent, params[:user_agent]
|
||||
|
||||
.connection-prompt
|
||||
.connection-prompt__row.connection-prompt__connection
|
||||
.connection-prompt__column
|
||||
= image_tag current_account.avatar.url(:original), size: 96, class: 'account__avatar'
|
||||
|
||||
%p= t('identity_proofs.i_am_html', username: content_tag(:strong,current_account.username), service: site_hostname)
|
||||
|
||||
.connection-prompt__column.connection-prompt__column-sep
|
||||
= fa_icon 'link'
|
||||
|
||||
.connection-prompt__column
|
||||
= image_tag @proof.badge.avatar_url, size: 96, class: 'account__avatar'
|
||||
|
||||
%p= t('identity_proofs.i_am_html', username: content_tag(:strong, @proof.provider_username), service: @proof.provider.capitalize)
|
||||
|
||||
.connection-prompt__post
|
||||
= f.input :post_status, label: t('identity_proofs.publicize_checkbox'), as: :boolean, wrapper: :with_label, :input_html => { checked: true }
|
||||
|
||||
= f.input :status_text, as: :text, input_html: { value: t('identity_proofs.publicize_toot', username: @proof.provider_username, service: @proof.provider.capitalize, url: @proof.badge.proof_url), rows: 4 }
|
||||
|
||||
= f.button :button, t('identity_proofs.authorize'), type: :submit
|
||||
= link_to t('simple_form.no'), settings_identity_proofs_url, class: 'button negative'
|
||||
15
app/views/settings/imports/show.html.haml
Normal file
15
app/views/settings/imports/show.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.import')
|
||||
|
||||
= simple_form_for @import, url: settings_import_path do |f|
|
||||
.field-group
|
||||
= f.input :type, collection: Import.types.keys, wrapper: :with_block_label, include_blank: false, label_method: lambda { |type| I18n.t("imports.types.#{type}") }, hint: t('imports.preface')
|
||||
|
||||
.fields-row
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :data, wrapper: :with_block_label, hint: t('simple_form.hints.imports.data')
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :mode, as: :radio_buttons, collection: Import::MODES, label_method: lambda { |mode| safe_join([I18n.t("imports.modes.#{mode}"), content_tag(:span, I18n.t("imports.modes.#{mode}_long"), class: 'hint')]) }, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
.actions
|
||||
= f.button :button, t('imports.upload'), type: :submit
|
||||
17
app/views/settings/migrations/show.html.haml
Normal file
17
app/views/settings/migrations/show.html.haml
Normal file
@@ -0,0 +1,17 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.migrate')
|
||||
|
||||
= simple_form_for @migration, as: :migration, url: settings_migration_path, html: { method: :put } do |f|
|
||||
- if @migration.account
|
||||
%p.hint= t('migrations.currently_redirecting')
|
||||
|
||||
.fields-group
|
||||
= render partial: 'application/card', locals: { account: @migration.account }
|
||||
|
||||
= render 'shared/error_messages', object: @migration
|
||||
|
||||
.fields-group
|
||||
= f.input :acct, placeholder: t('migrations.acct')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('migrations.proceed'), type: :submit, class: 'negative'
|
||||
30
app/views/settings/notifications/show.html.haml
Normal file
30
app/views/settings/notifications/show.html.haml
Normal file
@@ -0,0 +1,30 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.notifications')
|
||||
|
||||
= simple_form_for current_user, url: settings_notifications_path, html: { method: :put } do |f|
|
||||
= render 'shared/error_messages', object: current_user
|
||||
|
||||
.fields-group
|
||||
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
|
||||
= ff.input :follow, as: :boolean, wrapper: :with_label
|
||||
= ff.input :follow_request, as: :boolean, wrapper: :with_label
|
||||
= ff.input :reblog, as: :boolean, wrapper: :with_label
|
||||
= ff.input :favourite, as: :boolean, wrapper: :with_label
|
||||
= ff.input :mention, as: :boolean, wrapper: :with_label
|
||||
|
||||
- if current_user.staff?
|
||||
= ff.input :report, as: :boolean, wrapper: :with_label
|
||||
= ff.input :pending_account, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
|
||||
= ff.input :digest, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.simple_fields_for :interactions, hash_to_object(current_user.settings.interactions) do |ff|
|
||||
= ff.input :must_be_follower, as: :boolean, wrapper: :with_label
|
||||
= ff.input :must_be_following, as: :boolean, wrapper: :with_label
|
||||
= ff.input :must_be_following_dm, as: :boolean, wrapper: :with_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
67
app/views/settings/preferences/show.html.haml
Normal file
67
app/views/settings/preferences/show.html.haml
Normal file
@@ -0,0 +1,67 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.preferences')
|
||||
|
||||
%ul.quick-nav
|
||||
%li= link_to t('preferences.languages'), '#settings_languages'
|
||||
%li= link_to t('preferences.publishing'), '#settings_publishing'
|
||||
%li= link_to t('preferences.other'), '#settings_other'
|
||||
%li= link_to t('preferences.web'), '#settings_web'
|
||||
%li= link_to t('settings.notifications'), settings_notifications_path
|
||||
|
||||
= simple_form_for current_user, url: settings_preferences_path, html: { method: :put } do |f|
|
||||
= render 'shared/error_messages', object: current_user
|
||||
|
||||
.fields-row#settings_languages
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, selected: I18n.locale
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :setting_default_language, collection: [nil] + filterable_languages.sort, wrapper: :with_label, label_method: lambda { |locale| locale.nil? ? I18n.t('statuses.language_detection') : human_locale(locale) }, required: false, include_blank: false
|
||||
|
||||
.fields-group
|
||||
= f.input :chosen_languages, collection: filterable_languages.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
%hr#settings_publishing/
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_default_privacy, collection: Status.selectable_visibilities, wrapper: :with_floating_label, include_blank: false, label_method: lambda { |visibility| safe_join([I18n.t("statuses.visibilities.#{visibility}"), content_tag(:span, I18n.t("statuses.visibilities.#{visibility}_long"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
= f.input :setting_default_sensitive, as: :boolean, wrapper: :with_label
|
||||
|
||||
%hr#settings_other/
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_noindex, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_hide_network, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_show_application, as: :boolean, wrapper: :with_label
|
||||
|
||||
%hr#settings_web/
|
||||
|
||||
.fields-row
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :setting_theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false, hint: false
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'], wrapper: :with_label, include_blank: false, label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_advanced_layout, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_delete_modal, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_aggregate_reblogs, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_expand_spoilers, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label
|
||||
= f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
67
app/views/settings/profiles/show.html.haml
Normal file
67
app/views/settings/profiles/show.html.haml
Normal file
@@ -0,0 +1,67 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.edit_profile')
|
||||
|
||||
= simple_form_for @account, url: settings_profile_path, html: { method: :put } do |f|
|
||||
= render 'shared/error_messages', object: @account
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :display_name, wrapper: :with_label, input_html: { maxlength: 30 }, hint: false
|
||||
= f.input :note, wrapper: :with_label, input_html: { maxlength: 500 }, hint: false
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6
|
||||
= render 'application/card', account: @account
|
||||
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
= f.input :header, wrapper: :with_label, input_html: { accept: AccountHeader::IMAGE_MIME_TYPES.join(',') }, hint: t('simple_form.hints.defaults.header', dimensions: '1500x500', size: number_to_human_size(AccountHeader::LIMIT))
|
||||
|
||||
= f.input :avatar, wrapper: :with_label, input_html: { accept: AccountAvatar::IMAGE_MIME_TYPES.join(',') }, hint: t('simple_form.hints.defaults.avatar', dimensions: '400x400', size: number_to_human_size(AccountAvatar::LIMIT))
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.fields-group
|
||||
= f.input :locked, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.locked')
|
||||
|
||||
.fields-group
|
||||
= f.input :bot, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.bot')
|
||||
|
||||
- if Setting.profile_directory
|
||||
.fields-group
|
||||
= f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable_html', min_followers: Account::MIN_FOLLOWERS_DISCOVERY, path: explore_path)
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
.input.with_block_label
|
||||
%label= t('simple_form.labels.defaults.fields')
|
||||
%span.hint= t('simple_form.hints.defaults.fields')
|
||||
|
||||
= f.simple_fields_for :fields do |fields_f|
|
||||
.row
|
||||
= fields_f.input :name, placeholder: t('simple_form.labels.account.fields.name'), input_html: { maxlength: 255 }
|
||||
= fields_f.input :value, placeholder: t('simple_form.labels.account.fields.value'), input_html: { maxlength: 255 }
|
||||
|
||||
.fields-row__column.fields-group.fields-row__column-6
|
||||
%h6= t('verification.verification')
|
||||
%p.hint= t('verification.explanation_html')
|
||||
|
||||
.input-copy
|
||||
.input-copy__wrapper
|
||||
%input{ type: :text, maxlength: '999', spellcheck: 'false', readonly: 'true', value: link_to('Gab Social', ActivityPub::TagManager.instance.url_for(@account), rel: 'me').to_str }
|
||||
%button{ type: :button }= t('generic.copy')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
%hr/
|
||||
|
||||
%h6= t('auth.migrate_account')
|
||||
%p.muted-hint= t('auth.migrate_account_html', path: settings_migration_path)
|
||||
|
||||
- if open_deletion?
|
||||
%hr.spacer/
|
||||
|
||||
%h6= t('auth.delete_account')
|
||||
%p.muted-hint= t('auth.delete_account_html', path: settings_delete_path)
|
||||
10
app/views/settings/shared/_links.html.haml
Normal file
10
app/views/settings/shared/_links.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
%ul.no-list
|
||||
- if controller_name != 'profiles'
|
||||
%li= link_to t('settings.edit_profile'), settings_profile_path
|
||||
- if controller_name != 'preferences'
|
||||
%li= link_to t('settings.preferences'), settings_preferences_path
|
||||
- if controller_name != 'registrations'
|
||||
%li= link_to t('auth.change_password'), edit_user_registration_path
|
||||
- if controller_name != 'two_factor_authentications'
|
||||
%li= link_to t('settings.two_factor_authentication'), settings_two_factor_authentication_path
|
||||
%li= link_to t('settings.back'), root_path
|
||||
@@ -0,0 +1,18 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.two_factor_authentication')
|
||||
|
||||
= simple_form_for @confirmation, url: settings_two_factor_authentication_confirmation_path, method: :post do |f|
|
||||
%p.hint= t('two_factor_authentication.instructions_html')
|
||||
|
||||
.qr-wrapper
|
||||
.qr-code!= @qrcode.as_svg(padding: 0, module_size: 4)
|
||||
|
||||
.qr-alternative
|
||||
%p.hint= t('two_factor_authentication.manual_instructions')
|
||||
%samp.qr-alternative__code= current_user.otp_secret.scan(/.{4}/).join(' ')
|
||||
|
||||
.fields-group
|
||||
= f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('two_factor_authentication.enable'), type: :submit
|
||||
@@ -0,0 +1,9 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.two_factor_authentication')
|
||||
|
||||
%p.hint= t('two_factor_authentication.recovery_instructions_html')
|
||||
|
||||
%ol.recovery-codes
|
||||
- @recovery_codes.each do |code|
|
||||
%li<
|
||||
%samp= code
|
||||
34
app/views/settings/two_factor_authentications/show.html.haml
Normal file
34
app/views/settings/two_factor_authentications/show.html.haml
Normal file
@@ -0,0 +1,34 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.two_factor_authentication')
|
||||
|
||||
- if current_user.otp_required_for_login
|
||||
%p.positive-hint
|
||||
= fa_icon 'check'
|
||||
= ' '
|
||||
= t 'two_factor_authentication.enabled'
|
||||
|
||||
%hr/
|
||||
|
||||
= simple_form_for @confirmation, url: settings_two_factor_authentication_path, method: :delete do |f|
|
||||
= f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
|
||||
|
||||
.actions
|
||||
= f.button :button, t('two_factor_authentication.disable'), type: :submit
|
||||
|
||||
%hr/
|
||||
|
||||
%h6= t('two_factor_authentication.recovery_codes')
|
||||
%p.muted-hint
|
||||
= t('two_factor_authentication.lost_recovery_codes')
|
||||
= link_to t('two_factor_authentication.generate_recovery_codes'),
|
||||
settings_two_factor_authentication_recovery_codes_path,
|
||||
data: { method: :post }
|
||||
|
||||
- else
|
||||
.simple_form
|
||||
%p.hint= t('two_factor_authentication.description_html')
|
||||
|
||||
= link_to t('two_factor_authentication.setup'),
|
||||
settings_two_factor_authentication_path,
|
||||
data: { method: :post },
|
||||
class: 'block-button'
|
||||
@@ -0,0 +1,8 @@
|
||||
%tr
|
||||
%td= verification_request.id
|
||||
%td= verification_request.created_at
|
||||
%td
|
||||
= link_to verification_request.account.username, admin_account_url(verification_request.account.id)
|
||||
%td
|
||||
= table_link_to 'download', t('verifications.moderation.view_proof'), verification_request.image.url, target: "_blank"
|
||||
= table_link_to 'checkmark', t('verifications.moderation.approve'), settings_verifications_approve_url(verification_request.id)
|
||||
15
app/views/settings/verifications/moderation/index.html.haml
Normal file
15
app/views/settings/verifications/moderation/index.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
- content_for :page_title do
|
||||
= t('verifications.moderation.title')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('verifications.moderation.id')
|
||||
%th= t('verifications.moderation.date')
|
||||
%th= t('verifications.moderation.account')
|
||||
%th
|
||||
%tbody
|
||||
= render partial: 'settings/verifications/moderation/verification_request', collection: @verification_requests, as: :verification_request
|
||||
27
app/views/settings/verifications/requests/index.html.haml
Normal file
27
app/views/settings/verifications/requests/index.html.haml
Normal file
@@ -0,0 +1,27 @@
|
||||
- content_for :page_title do
|
||||
= t('verifications.requests.title')
|
||||
|
||||
- if @current_account.is_verified?
|
||||
.alert.alert-info
|
||||
= t('verifications.requests.already_verified_html')
|
||||
- elsif @account_verification_request.persisted?
|
||||
.alert.alert-success
|
||||
= t('verifications.requests.already_requested')
|
||||
- elsif not @current_account.is_pro?
|
||||
.alert.alert-info
|
||||
= t('verifications.requests.only_allowed_for_pro')
|
||||
- else
|
||||
= simple_form_for @account_verification_request, url: settings_verifications_requests_path do |f|
|
||||
= t('verifications.requests.explanation_html')
|
||||
|
||||
%br
|
||||
|
||||
= render 'shared/error_messages', object: @account_verification_request
|
||||
|
||||
= f.hidden_field :account
|
||||
|
||||
.fields-group
|
||||
= f.input :image, wrapper: :with_label, input_html: { accept: 'image/png' }, hint: t('verifications.requests.image_hint')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('verifications.requests.submit'), type: :submit
|
||||
Reference in New Issue
Block a user