BLOG-126 Post management (list and create) #139

Merged
squid merged 10 commits from BLOG-126_post_management into main 2025-10-15 04:21:15 +08:00
4 changed files with 6 additions and 4 deletions
Showing only changes of commit 4472a5de4b - Show all commits

View File

@ -15,7 +15,7 @@ import { PostRepositoryImpl } from '$lib/post/adapter/gateway/postRepositoryImpl
import { PostCreatedStore } from '$lib/post/adapter/presenter/postCreatedStore';
import type { PostInfoViewModel } from '$lib/post/adapter/presenter/postInfoViewModel';
import { PostsListedStore } from '$lib/post/adapter/presenter/postsListedStore';
import { PostLoadedStore } from '$lib/post/adapter/presenter/PostLoadedStore';
import { PostLoadedStore } from '$lib/post/adapter/presenter/postLoadedStore';
import type { PostViewModel } from '$lib/post/adapter/presenter/postViewModel';
import type { PostRepository } from '$lib/post/application/gateway/postRepository';
import { CreatePostUseCase } from '$lib/post/application/useCase/createPostUseCase';

View File

@ -1,4 +1,5 @@
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
import { ImageInfoViewModel } from '$lib/image/adapter/presenter/imageInfoViewModel';
import type { UploadImageUseCase } from '$lib/image/application/useCase/uploadImageUseCase';
import { captureException } from '@sentry/sveltekit';
@ -6,7 +7,7 @@ import { get, writable } from 'svelte/store';
export type ImageInfoState = AsyncState<ImageInfoViewModel>;
export class ImageUploadedStore {
export class ImageUploadedStore implements BaseStore<ImageInfoState, File> {
private readonly state = writable<ImageInfoState>(AsyncState.idle<ImageInfoViewModel>(null));
constructor(private readonly uploadImageUseCase: UploadImageUseCase) {}
@ -32,6 +33,7 @@ export class ImageUploadedStore {
captureException(e);
}
this.state.set(result);
return result;
}
}

View File

@ -5,7 +5,7 @@
import SafeHtml from '$lib/common/framework/ui/SafeHtml.svelte';
import generateTitle from '$lib/common/framework/ui/generateTitle';
import StructuredData from '$lib/post/framework/ui/StructuredData.svelte';
import { PostLoadedStore } from '$lib/post/adapter/presenter/PostLoadedStore';
import { PostLoadedStore } from '$lib/post/adapter/presenter/postLoadedStore';
const { id }: { id: string } = $props();

View File

@ -4,7 +4,7 @@
import type { PageProps } from './$types';
import PostContentPage from '$lib/post/framework/ui/PostContentPage.svelte';
import { Container } from '$lib/container';
import { PostLoadedStore } from '$lib/post/adapter/presenter/PostLoadedStore';
import { PostLoadedStore } from '$lib/post/adapter/presenter/postLoadedStore';
const { data, params }: PageProps = $props();
const { id } = params;