♻️ Interactive v2 #1
| @@ -62,7 +62,7 @@ func listFeed(c *fiber.Ctx) error { | ||||
|             GROUP BY article_id, moment_id) as reactions | ||||
|             ON (feed.model_type = 'article' AND feed.id = reactions.article_id) OR  | ||||
| 			   (feed.model_type = 'moment' AND feed.id = reactions.moment_id) | ||||
| 		WHERE %s LIMIT ? OFFSET ?`, userTable, commentTable, reactionTable, whereCondition), | ||||
| 		WHERE %s ORDER BY feed.created_at desc  LIMIT ? OFFSET ?`, userTable, commentTable, reactionTable, whereCondition), | ||||
| 		database.C.Select(queryArticle).Model(&models.Article{}), | ||||
| 		database.C.Select(queryMoment).Model(&models.Moment{}), | ||||
| 		take, | ||||
|   | ||||
| @@ -53,24 +53,7 @@ | ||||
|     </v-form> | ||||
|   </v-card> | ||||
|  | ||||
|   <v-dialog eager v-model="dialogs.plan" class="max-w-[540px]"> | ||||
|     <v-card title="Plan your publish"> | ||||
|       <template #text> | ||||
|         <v-text-field | ||||
|           v-model="extras.publishedAt" | ||||
|           class="mt-2" | ||||
|           label="Publish date" | ||||
|           hint="Your post will hidden for public before this time. Leave blank will publish immediately" | ||||
|           variant="outlined" | ||||
|           type="datetime-local" | ||||
|           clearable | ||||
|         /> | ||||
|       </template> | ||||
|       <template #actions> | ||||
|         <v-btn class="ms-auto" text="Ok" @click="dialogs.plan = false"></v-btn> | ||||
|       </template> | ||||
|     </v-card> | ||||
|   </v-dialog> | ||||
|   <planned-publish v-model:show="dialogs.plan" v-model:value="extras.publishedAt" /> | ||||
|  | ||||
|   <v-snackbar v-model="success" :timeout="3000">Your post has been published.</v-snackbar> | ||||
|  | ||||
| @@ -83,6 +66,7 @@ import { request } from "@/scripts/request" | ||||
| import { useEditor } from "@/stores/editor" | ||||
| import { getAtk } from "@/stores/userinfo" | ||||
| import { reactive, ref } from "vue" | ||||
| import PlannedPublish from "@/components/publish/parts/PlannedPublish.vue" | ||||
|  | ||||
| const editor = useEditor() | ||||
|  | ||||
|   | ||||
							
								
								
									
										31
									
								
								pkg/views/src/components/publish/parts/PlannedPublish.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								pkg/views/src/components/publish/parts/PlannedPublish.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| <template> | ||||
|   <v-dialog | ||||
|     eager | ||||
|     class="max-w-[540px]" | ||||
|     :model-value="props.show" | ||||
|     @update:model-value="(val) => emits('update:show', val)" | ||||
|   > | ||||
|     <v-card title="Plan your publish"> | ||||
|       <template #text> | ||||
|         <v-text-field | ||||
|           clearable | ||||
|           class="mt-2" | ||||
|           label="Publish date" | ||||
|           hint="Your post will hidden for public before this time. Leave blank will publish immediately" | ||||
|           variant="outlined" | ||||
|           type="datetime-local" | ||||
|           :model-value="props.value" | ||||
|           @update:model-value="(val) => emits('update:value', val)" | ||||
|         /> | ||||
|       </template> | ||||
|       <template #actions> | ||||
|         <v-btn class="ms-auto" text="Ok" @click="emits('update:show', false)"></v-btn> | ||||
|       </template> | ||||
|     </v-card> | ||||
|   </v-dialog> | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| const props = defineProps<{ show: boolean; value: string | null }>() | ||||
| const emits = defineEmits(["update:show", "update:value"]) | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user