WIP Add notifications preferences page
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									6848bd739c
								
							
						
					
					
						commit
						334b47353e
					
				| @ -29,8 +29,9 @@ class SettingsController < ApplicationController | |||||||
| 
 | 
 | ||||||
|   def set_settings_section |   def set_settings_section | ||||||
|     @settings_section = params[:section] |     @settings_section = params[:section] | ||||||
|  |     allowed_sections  = [:profile, :account, :notifications] | ||||||
| 
 | 
 | ||||||
|     unless [:profile, :account].include?(@settings_section.to_sym) |     unless allowed_sections.include?(@settings_section.to_sym) | ||||||
|       redirect_to setting_path(:profile) |       redirect_to setting_path(:profile) | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|  | |||||||
| @ -1 +1 @@ | |||||||
| <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bell"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg> | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bell <%= custom_class %>"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg> | ||||||
|  | |||||||
| Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 342 B | 
							
								
								
									
										16
									
								
								app/views/settings/_notifications.html.erb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								app/views/settings/_notifications.html.erb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | <section> | ||||||
|  |   <h3>Lightning Wallet</h3> | ||||||
|  | 
 | ||||||
|  |   <ul role="list"> | ||||||
|  |     <%= render FormElements::FieldsetComponent.new( | ||||||
|  |       positioning: :horizontal, | ||||||
|  |       title: "Sats received", | ||||||
|  |       description: "Notify when sats are sent to my Lightning Address" | ||||||
|  |     ) do %> | ||||||
|  |     <%= select_tag :sats_received, options_for_select([ | ||||||
|  |       ["off", "off"], | ||||||
|  |       ["Chat (Jabber)", "xmpp"] | ||||||
|  |     ]) %> | ||||||
|  |     <% end %> | ||||||
|  |   </ul> | ||||||
|  | </section> | ||||||
| @ -7,5 +7,6 @@ | |||||||
|   active: current_page?(setting_path(:account)) |   active: current_page?(setting_path(:account)) | ||||||
| ) %> | ) %> | ||||||
| <%= render SidenavLinkComponent.new( | <%= render SidenavLinkComponent.new( | ||||||
|   name: "Security", path: "#", icon: "shield", disabled: true |   name: "Notifications", path: setting_path(:notifications), icon: "bell", | ||||||
|  |   active: current_page?(setting_path(:notifications)) | ||||||
| ) %> | ) %> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user