| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  | <ul> | 
					
						
							|  |  |  |   {{#each statuses as status}} | 
					
						
							| 
									
										
										
										
											2018-01-11 00:26:35 -08:00
										 |  |  |   <li> | 
					
						
							|  |  |  |     <Status :status /> | 
					
						
							|  |  |  |   </li> | 
					
						
							| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  |   {{/each}} | 
					
						
							|  |  |  | </ul> | 
					
						
							| 
									
										
										
										
											2018-01-11 00:26:35 -08:00
										 |  |  | <style> | 
					
						
							|  |  |  |   ul { | 
					
						
							|  |  |  |     list-style: none; | 
					
						
							|  |  |  |     padding-right: 10px; | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2018-01-14 21:41:19 -08:00
										 |  |  |   li { | 
					
						
							|  |  |  |     border-bottom: 1px solid var(--main-border); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2018-01-11 00:26:35 -08:00
										 |  |  | </style> | 
					
						
							| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  | <script> | 
					
						
							|  |  |  |   import { store } from '../_utils/store' | 
					
						
							| 
									
										
										
										
											2018-01-13 14:19:51 -08:00
										 |  |  |   import { getHomeTimeline } from '../_utils/mastodon/oauth' | 
					
						
							| 
									
										
										
										
											2018-01-10 20:45:02 -08:00
										 |  |  |   import fixture from '../_utils/fixture.json' | 
					
						
							|  |  |  |   import Status from './Status.html' | 
					
						
							| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   export default { | 
					
						
							| 
									
										
										
										
											2018-01-10 20:45:02 -08:00
										 |  |  |     oncreate: async function () { | 
					
						
							| 
									
										
										
										
											2018-01-14 19:28:50 -08:00
										 |  |  |       if (!process.browser) { | 
					
						
							|  |  |  |         return | 
					
						
							| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  |       } | 
					
						
							| 
									
										
										
										
											2018-01-14 19:28:50 -08:00
										 |  |  |       let instanceData = this.store.get('currentInstance') | 
					
						
							|  |  |  |       if (!instanceData) { | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       let response = fixture | 
					
						
							|  |  |  |       // let response = await (await getHomeTimeline(instanceData.instanceName, instanceData.access_token)).json() | 
					
						
							|  |  |  |       if (process.env.NODE_ENV !== 'production') { | 
					
						
							|  |  |  |         console.log(response) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       this.set({'statuses': response}) | 
					
						
							| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  |     }, | 
					
						
							|  |  |  |     data: () => ({ | 
					
						
							|  |  |  |       target: 'home', | 
					
						
							|  |  |  |       statuses: [] | 
					
						
							|  |  |  |     }), | 
					
						
							| 
									
										
										
										
											2018-01-10 20:45:02 -08:00
										 |  |  |     store: () => store, | 
					
						
							|  |  |  |     components: { | 
					
						
							|  |  |  |       Status | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-01-08 18:14:21 -08:00
										 |  |  |   } | 
					
						
							|  |  |  | </script> |