✨ Able to embed post into products
This commit is contained in:
		
							
								
								
									
										24
									
								
								components/content/EmbedPostItem.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								components/content/EmbedPostItem.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| <template> | ||||
|   <div class="my-2"> | ||||
|     <div v-if="status == 'pending'">{{ t("loading") }}</div> | ||||
|     <post-item v-else class="no-margin-post" :post="post" :force-show-content="props.forceShowContent" /> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import PostItem from "~/components/PostItem.vue" | ||||
|  | ||||
| const props = defineProps<{ id: number, forceShowContent?: boolean }>() | ||||
|  | ||||
| const { t } = useI18n() | ||||
|  | ||||
| const config = useRuntimeConfig() | ||||
|  | ||||
| const { status, data: post } = await useFetch<any>(`${config.public.solarNetworkApi}/cgi/interactive/posts/${props.id}`) | ||||
| </script> | ||||
|  | ||||
| <style scoped> | ||||
| .no-margin-post { | ||||
|   margin: 0 !important; | ||||
| } | ||||
| </style> | ||||
| @@ -17,8 +17,8 @@ with a little something along the way to keep you from eating something you shou | ||||
|  | ||||
| ## Download | ||||
|  | ||||
| - iOS TestFlight: *not ready yet*. | ||||
| - iOS App Store: *wait a little longer | ||||
| - iOS TestFlight: https://testflight.apple.com/join/pYb6wRbr | ||||
| - iOS App Store: *wait a little bit longer* | ||||
| - Android APK: https://files.solsynth.dev/production01/dietary-guard/app-arm64-v8a-release.apk | ||||
|  | ||||
| Translated with DeepL.com (free version) | ||||
| :embed-post-item{id=887} | ||||
|   | ||||
| @@ -16,6 +16,8 @@ author: [littlesheep] | ||||
|  | ||||
| ## 下载 | ||||
|  | ||||
| - iOS TestFlight: *还没好* | ||||
| - iOS TestFlight: https://testflight.apple.com/join/pYb6wRbr | ||||
| - iOS App Store: *再等等* | ||||
| - Android APK: https://files.solsynth.dev/production01/dietary-guard/app-arm64-v8a-release.apk | ||||
|  | ||||
| :embed-post-item{id=887} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user