diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index d4efea5..8f30419 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -110,7 +110,9 @@ class SettingsController < ApplicationController def set_settings_section @settings_section = params[:section] - allowed_sections = [:profile, :account, :lightning, :xmpp, :experiments] + allowed_sections = [ + :profile, :account, :lightning, :remotestorage, :xmpp, :experiments + ] unless allowed_sections.include?(@settings_section.to_sym) redirect_to setting_path(:profile) @@ -124,6 +126,7 @@ class SettingsController < ApplicationController def user_params params.require(:user).permit(:display_name, :avatar, preferences: [ :lightning_notify_sats_received, + :remotestorage_notify_auth_created, :xmpp_exchange_contacts_with_invitees ]) end diff --git a/app/views/icons/_remotestorage.html.erb b/app/views/icons/_remotestorage.html.erb new file mode 100644 index 0000000..2daafc4 --- /dev/null +++ b/app/views/icons/_remotestorage.html.erb @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/views/settings/_remotestorage.html.erb b/app/views/settings/_remotestorage.html.erb new file mode 100644 index 0000000..dc93b8e --- /dev/null +++ b/app/views/settings/_remotestorage.html.erb @@ -0,0 +1,25 @@ +<%= form_for @user, url: setting_path(:remotestorage), html: { :method => :put } do |f| %> +
+

Notifications

+ +
+
+

+ <%= f.submit 'Save', class: "btn-md btn-blue w-full md:w-auto" %> +

+
+<% end %> diff --git a/app/views/shared/_sidenav_settings.html.erb b/app/views/shared/_sidenav_settings.html.erb index aa30f60..359f3e1 100644 --- a/app/views/shared/_sidenav_settings.html.erb +++ b/app/views/shared/_sidenav_settings.html.erb @@ -18,6 +18,12 @@ active: @settings_section.to_s == "lightning" ) %> <% end %> +<% if Setting.remotestorage_enabled %> +<%= render SidenavLinkComponent.new( + name: "Storage", path: setting_path(:remotestorage), icon: "remotestorage", + active: @settings_section.to_s == "remotestorage" +) %> +<% end %> <% if Setting.nostr_enabled %> <%= render SidenavLinkComponent.new( name: "Experiments", path: setting_path(:experiments), icon: "science", diff --git a/config/default_preferences.yml b/config/default_preferences.yml index ff7f051..c65d658 100644 --- a/config/default_preferences.yml +++ b/config/default_preferences.yml @@ -1,2 +1,3 @@ lightning_notify_sats_received: disabled # or xmpp, email +remotestorage_notify_auth_created: email # or xmpp, email xmpp_exchange_contacts_with_invitees: true