diff --git a/app/assets/images/twemoji/account.svg b/app/assets/images/twemoji/account.svg new file mode 100644 index 000000000..5949e45bf --- /dev/null +++ b/app/assets/images/twemoji/account.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/assets/images/twemoji/billing.svg b/app/assets/images/twemoji/billing.svg new file mode 100644 index 000000000..56f9a5cb2 --- /dev/null +++ b/app/assets/images/twemoji/billing.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/assets/images/twemoji/customization.svg b/app/assets/images/twemoji/customization.svg new file mode 100644 index 000000000..652e85226 --- /dev/null +++ b/app/assets/images/twemoji/customization.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/assets/images/twemoji/extensions.svg b/app/assets/images/twemoji/extensions.svg new file mode 100644 index 000000000..913b3fe42 --- /dev/null +++ b/app/assets/images/twemoji/extensions.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/assets/images/twemoji/notifications.svg b/app/assets/images/twemoji/notifications.svg new file mode 100644 index 000000000..663204eeb --- /dev/null +++ b/app/assets/images/twemoji/notifications.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/assets/images/twemoji/organization.svg b/app/assets/images/twemoji/organization.svg new file mode 100644 index 000000000..22cb695c4 --- /dev/null +++ b/app/assets/images/twemoji/organization.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/assets/images/twemoji/profile.svg b/app/assets/images/twemoji/profile.svg new file mode 100644 index 000000000..938e32594 --- /dev/null +++ b/app/assets/images/twemoji/profile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 958077651..eab2eaa95 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -235,14 +235,17 @@ class UsersController < ApplicationController return @tab = "profile" if @tab.blank? case @tab + when "profile" + handle_integrations_tab when "organization" handle_organization_tab - when "integrations" - handle_integrations_tab when "billing" handle_billing_tab when "response-templates" handle_response_templates_tab + when "extensions" + handle_integrations_tab + handle_response_templates_tab else not_found unless @tab.in?(Constants::Settings::TAB_LIST.map { |t| t.downcase.tr(" ", "-") }) end diff --git a/app/lib/constants/settings.rb b/app/lib/constants/settings.rb index c7d742e51..3e8dda9bf 100644 --- a/app/lib/constants/settings.rb +++ b/app/lib/constants/settings.rb @@ -2,15 +2,12 @@ module Constants module Settings TAB_LIST = %w[ Profile - UX - Integrations + Customization Notifications - Publishing\ from\ RSS - Organization - Response\ Templates - Billing Account - Misc + Billing + Organization + Extensions ].freeze end end diff --git a/app/views/users/_account.html.erb b/app/views/users/_account.html.erb index 4d1576811..7ae5e757f 100644 --- a/app/views/users/_account.html.erb +++ b/app/views/users/_account.html.erb @@ -47,7 +47,32 @@
-

Danger Zone

+

+ Export content +

+ + <% if @user.export_requested? %> +
+

You have recently requested an export of your content. Please check your email.

+
+ <% else %> +

You can request an export of all your content. Currently we only support the export of your posts and comments. They will be emailed to your inbox.

+ + <%= form_for(@user, html: { id: nil }) do |f| %> +
+ <%= f.check_box :export_requested, class: "crayons-checkbox" %> + <%= f.label :export_requested, "Request an export of your content", class: "crayons-field__label" %> +
+ <%= f.hidden_field :tab, value: @tab, id: nil %> +
+ <% end %> + <% end %> +
+ +
+

+ Danger Zone +

<% if @user.identities.enabled.size > 1 %>
@@ -80,13 +105,13 @@ <% end %>
-

Delete Account

+

Delete account

<% if current_user.email? %> <%= form_tag user_request_destroy_path, method: :post, autocomplete: "off", id: "delete__account", class: "grid gap-2" do %>

Deleting your account will:

    -
  • delete your profile, along with your authentication associations. +
  • Delete your profile, along with your authentication associations. This does not include applications permissions. You will have to remove them yourself: @@ -94,8 +119,8 @@
  • <%# TODO: expand the delete messaging later %> -
  • delete any and all content you have, such as articles, comments, your reading list or chat messages.
  • -
  • allow your username to become available to anyone.
  • +
  • Delete any and all content you have, such as articles, comments, your reading list or chat messages.
  • +
  • Allow your username to become available to anyone.
<% end %> diff --git a/app/views/users/_account_set_password.html.erb b/app/views/users/_account_set_password.html.erb index 04bc28277..7ff08dcba 100644 --- a/app/views/users/_account_set_password.html.erb +++ b/app/views/users/_account_set_password.html.erb @@ -1,7 +1,11 @@
-

Set New Password

-

As an alternative to signing in via linked social accounts, you may create a password.

+

+ Set new password +

+

+ As an alternative to signing in via linked social accounts, you may create a password. +

<%= form_for @user do |f| %>
diff --git a/app/views/users/_billing.html.erb b/app/views/users/_billing.html.erb index b9014c2df..f0dbddc16 100644 --- a/app/views/users/_billing.html.erb +++ b/app/views/users/_billing.html.erb @@ -1,5 +1,7 @@
-

Billing Details

+

+ Billing +

<% if current_user.stripe_id_code.blank? %> <%= form_tag stripe_active_cards_path, id: "credit-card-form", method: :post do %> diff --git a/app/views/users/_ux.html.erb b/app/views/users/_customization.html.erb similarity index 54% rename from app/views/users/_ux.html.erb rename to app/views/users/_customization.html.erb index d4786b84e..8150713a0 100644 --- a/app/views/users/_ux.html.erb +++ b/app/views/users/_customization.html.erb @@ -2,7 +2,9 @@ <%= form_for @user, html: { id: "ux-customization-form", class: "sticky-footer-form" } do |f| %>
-

Style Customization

+

+ Appearance +

Site Theme @@ -33,7 +35,9 @@
-

Writing

+

+ Writing +

<%= f.label :editor_version, "Editor Version", class: "crayons-field__label" %>
@@ -45,7 +49,9 @@
-

Content Customization

+

+ Content +

<%= f.label :experience_level, "What is your approximate experience level (1-5)?", class: "crayons-field__label" %>
@@ -57,8 +63,62 @@
+ <%= render partial: "language_settings" %> + +
+
+

+ Sponsors +

+

+ You have the option to remove sponsor messaging (where it is practical + to do so). Our wonderful sponsors help sustain the platform and improve + your experience, and we strive to make their presence constructive to + the community, but feel free to use this setting if you wish. +

+
+ + <%= form_for(@user, html: { id: nil, class: "grid gap-4" }) do |f| %> +
+ <%= f.check_box :display_sponsors, class: "crayons-checkbox" %> + <%= f.label :display_sponsors, "Display Sponsors (When browsing)", class: "crayons-field__label" %> +
+ +
+ <%= f.check_box :permit_adjacent_sponsors, class: "crayons-checkbox" %> + <%= f.label :permit_adjacent_sponsors, "Permit Nearby Sponsors (When publishing)", class: "crayons-field__label" %> +
+ + <%= f.hidden_field :tab, value: @tab, id: nil %> +
+ <% end %> +
+ +
+
+

+ Announcements +

+

+ Announcements inform you on important site-wide + information, like updates and events. +

+
+ + <%= form_for(@user, html: { id: nil, class: "grid gap-4" }) do |f| %> +
+ <%= f.check_box :display_announcements, class: "crayons-checkbox" %> + <%= f.label :display_announcements, "Display Announcements (When browsing)", class: "crayons-field__label" %> +
+ + <%= f.hidden_field :tab, value: @tab, id: nil %> +
+ <% end %> +
+ + <% end %> diff --git a/app/views/users/_extensions.html.erb b/app/views/users/_extensions.html.erb new file mode 100644 index 000000000..d227a1e08 --- /dev/null +++ b/app/views/users/_extensions.html.erb @@ -0,0 +1,58 @@ +<%= render partial: "response_templates" %> + +
+

+ Connect settings +

+ <%= form_for(@user, html: { id: nil, class: "grid gap-6" }) do |f| %> +
+ <%= f.label :inbox_type, "Inbox privacy", class: "crayons-field__label" %> +

Open your inbox to messages from people you don't follow or keep your inbox private to mutual follows.

+ <%= f.select :inbox_type, [%w[Open open], %w[Private private]], {}, { class: "crayons-select" } %> +
+ +
+ <%= f.label :inbox_guidelines, "Open inbox guidelines/instructions", class: "crayons-field__label" %> +

+ Optional +

+ + <%= f.text_area :inbox_guidelines, maxlength: 200, class: "crayons-textfield", rows: 5, placeholder: "For example: + - Only contact me about consulting opportunities. + - I'm happy to help beginners with CSS. + - Allow for a few days to respond. + - etc. + " %> +
+ + + <% end %> +
+ +<%= render partial: "publishing_from_rss" %> + +
+
+

+ Web monetization + beta +

+

+ Receive micropayments for time spent reading your posts directy. Learn more +

+

+
+ <%= form_for(@user, html: { id: nil, class: "grid gap-4" }) do |f| %> +
+ <%= f.label :payment_pointer, "Payment Pointer", class: "crayons-field__label" %> + <%= f.text_field :payment_pointer, class: "crayons-textfield", placeholder: "$pay.somethinglikethis.co/value" %> +
+ <%= f.hidden_field :tab, value: @tab, id: nil %> +
+ <% end %> +
+ +<%= render partial: "integrations" %> +<%= render partial: "users/integrations_github_repositories", locals: { show_integration: @github_repositories_show } %> diff --git a/app/views/users/_integrations.html.erb b/app/views/users/_integrations.html.erb index 6d7268a30..8f13d7770 100644 --- a/app/views/users/_integrations.html.erb +++ b/app/views/users/_integrations.html.erb @@ -1,16 +1,23 @@ -<%= render partial: "users/integrations_github_repositories", locals: { show_integration: @github_repositories_show } %> -
-

Generate a personal blog from your <%= community_name %> posts

+

+ Generate a personal blog from your <%= community_name %> posts +

<% if current_user.decorate.stackbit_integration? %>

Connected to Stackbit beta" />

Go To Your Stackbit Dashboard

Create New Stackbit Site

<% else %> -

Connect to Stackbit beta

-

Automatically generate a self-hosted static blog feed from your <%= community_name %> posts.

-

Get Started

+

+ Connect to Stackbit + beta +

+

+ Automatically generate a self-hosted static blog feed from your <%= community_name %> posts. +

+ + Get Started + <% end %>
diff --git a/app/views/users/_integrations_github_repositories.html.erb b/app/views/users/_integrations_github_repositories.html.erb index 6d9bc9d4e..b8bbd0af0 100644 --- a/app/views/users/_integrations_github_repositories.html.erb +++ b/app/views/users/_integrations_github_repositories.html.erb @@ -1,6 +1,13 @@ <% if show_integration %>
-

Pin a few of your GitHub repositories to your profile

+
+

+ GitHub +

+

+ Pin your GitHub repositories to your profile +

+
diff --git a/app/views/users/_language_settings.html.erb b/app/views/users/_language_settings.html.erb index 900293421..688c44e63 100644 --- a/app/views/users/_language_settings.html.erb +++ b/app/views/users/_language_settings.html.erb @@ -1,14 +1,17 @@
-

Languages beta

+

+ Languages +
+ beta +
+

Select which languages you'd prefer to see in your feed.

This setting controls which languages you are more likely to see throughout the site, but you may still see other languages, especially English.

-
-

This feature is in beta and will improve over time. Another way to tailor your feed is to discover and follow members who write in your preferred language.

-
- <%= form_tag users_update_language_settings_path, class: "grid gap-4" do |f| %> <% Languages::LIST.each do |code, name| %>