Persist UI settings, add missing localizations for German
This commit is contained in:
		
					parent
					
						
							
								23ebf60b95
							
						
					
				
			
			
				commit
				
					
						75f80bef10
					
				
			
		
					 25 changed files with 305 additions and 67 deletions
				
			
		|  | @ -1,21 +1,6 @@ | |||
| - content_for :header_tags do | ||||
|   :javascript | ||||
|     window.INITIAL_STATE = { | ||||
|       "meta": { | ||||
|         "access_token": "#{@token}", | ||||
|         "locale": "#{I18n.locale}", | ||||
|         "me": #{current_account.id} | ||||
|       }, | ||||
| 
 | ||||
|       "compose": { | ||||
|         "me": #{current_account.id}, | ||||
|         "private": #{current_account.locked?} | ||||
|       }, | ||||
| 
 | ||||
|       "accounts": { | ||||
|         #{current_account.id}: #{render(file: 'api/v1/accounts/show', locals: { account: current_user.account }, formats: :json)} | ||||
|       } | ||||
|     }; | ||||
|     window.INITIAL_STATE = #{render(file: 'home/initial_state', formats: :json)} | ||||
| 
 | ||||
|   = javascript_include_tag 'application' | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										24
									
								
								app/views/home/initial_state.json.rabl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								app/views/home/initial_state.json.rabl
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| object false | ||||
| 
 | ||||
| node(:meta) { | ||||
|   { | ||||
|     access_token: @token, | ||||
|     locale: I18n.locale, | ||||
|     me: current_account.id, | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| node(:compose) { | ||||
|   { | ||||
|     me: current_account.id, | ||||
|     private: current_account.locked?, | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| node(:accounts) { | ||||
|   { | ||||
|     current_account.id => partial('api/v1/accounts/show', object: current_account), | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| node(:settings) { @web_settings } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue