Add new user settings pages for Chat and Wallet
This commit is contained in:
27
app/views/settings/_lightning.html.erb
Normal file
27
app/views/settings/_lightning.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<%= form_for @user, url: setting_path(:lightning), html: { :method => :put } do |f| %>
|
||||
<section>
|
||||
<h3>Notifications</h3>
|
||||
<ul role="list">
|
||||
<%= render FormElements::FieldsetComponent.new(
|
||||
positioning: :horizontal,
|
||||
title: "Sats received",
|
||||
description: "Notify me when sats are sent to my Lightning Address"
|
||||
) do %>
|
||||
<% f.fields_for :preferences do |p| %>
|
||||
<% p.fields_for :lightning do |l| %>
|
||||
<%= l.select :notify_sats_received, options_for_select([
|
||||
["off", "off"],
|
||||
["Chat (Jabber)", "xmpp"],
|
||||
["E-Mail", "email"]
|
||||
], selected: @user.preferences.dig('lightning', 'notify_sats_received')) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<p class="pt-6 border-t border-gray-200 text-right">
|
||||
<%= f.submit 'Save', class: "btn-md btn-blue w-full md:w-auto" %>
|
||||
</p>
|
||||
</section>
|
||||
<% end %>
|
||||
18
app/views/settings/_xmpp.html.erb
Normal file
18
app/views/settings/_xmpp.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<%= form_for @user, url: setting_path(:xmpp), html: { :method => :put } do |f| %>
|
||||
<section>
|
||||
<h3>Contacts</h3>
|
||||
<ul role="list">
|
||||
<%= render FormElements::FieldsetToggleComponent.new(
|
||||
field_name: "user[preferences][xmpp][exchange_contacts_with_invitees]",
|
||||
enabled: @user.pref_enabled?("xmpp:exchange_contacts_with_invitees"),
|
||||
title: "Exchange contacts when invited user signs up",
|
||||
description: "Add each others contacts, so you can chat with them immediately"
|
||||
) %>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<p class="pt-6 border-t border-gray-200 text-right">
|
||||
<%= f.submit 'Save', class: "btn-md btn-blue w-full md:w-auto" %>
|
||||
</p>
|
||||
</section>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user