mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-08-10 06:14:07 +08:00
feat(account): polish reviews favorites and account UI
This commit is contained in:
@@ -14,6 +14,7 @@ const isSparkUser = (value: unknown): value is SparkUser => {
|
||||
typeof user.username === "string" &&
|
||||
typeof user.displayName === "string" &&
|
||||
typeof user.avatarUrl === "string" &&
|
||||
(user.coverUrl === undefined || typeof user.coverUrl === "string") &&
|
||||
typeof user.forumLevel === "string" &&
|
||||
Array.isArray(user.forumGroups) &&
|
||||
user.forumGroups.every((group) => typeof group === "string")
|
||||
|
||||
@@ -13,6 +13,10 @@ export const SPARK_BACKEND_BASE_URL: string =
|
||||
import.meta.env.VITE_SPARK_BACKEND_BASE_URL ||
|
||||
DEFAULT_SPARK_BACKEND_BASE_URL;
|
||||
|
||||
export const SPARK_ACCOUNT_CENTER_URL: string =
|
||||
import.meta.env.VITE_SPARK_ACCOUNT_CENTER_URL ||
|
||||
"https://account.spark-app.store/account";
|
||||
|
||||
export const FLARUM_BASE_URL = "https://bbs.spark-app.store";
|
||||
export const FLARUM_REGISTER_URL = `${FLARUM_BASE_URL}/register`;
|
||||
export const FLARUM_PROFILE_URL = `${FLARUM_BASE_URL}/u`;
|
||||
|
||||
@@ -256,10 +256,19 @@ export interface SparkUser {
|
||||
username: string;
|
||||
displayName: string;
|
||||
avatarUrl: string;
|
||||
coverUrl?: string;
|
||||
forumLevel: string;
|
||||
forumGroups: string[];
|
||||
}
|
||||
|
||||
export interface ReviewUserProfile {
|
||||
displayName: string;
|
||||
username?: string;
|
||||
avatarUrl?: string;
|
||||
coverUrl?: string;
|
||||
forumGroups?: string[];
|
||||
}
|
||||
|
||||
export interface AuthSession {
|
||||
accessToken: string;
|
||||
tokenType: "bearer";
|
||||
@@ -287,8 +296,26 @@ export interface RatingSummary {
|
||||
starCounts: Record<number, number>;
|
||||
}
|
||||
|
||||
export interface AppReviewReply {
|
||||
id: number;
|
||||
reviewId: number;
|
||||
parentId: number | null;
|
||||
content: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
userDisplayName: string;
|
||||
userAvatarUrl: string;
|
||||
likeCount: number;
|
||||
likedByCurrentUser: boolean;
|
||||
canDelete: boolean;
|
||||
isAuthor: boolean;
|
||||
isDeleted: boolean;
|
||||
replies: AppReviewReply[];
|
||||
}
|
||||
|
||||
export interface AppReview {
|
||||
id: number;
|
||||
userId?: number;
|
||||
rating: number;
|
||||
content: string;
|
||||
version: string;
|
||||
@@ -301,6 +328,12 @@ export interface AppReview {
|
||||
updatedAt: string;
|
||||
userDisplayName: string;
|
||||
userAvatarUrl: string;
|
||||
likeCount?: number;
|
||||
likedByCurrentUser?: boolean;
|
||||
canDelete?: boolean;
|
||||
isAuthor?: boolean;
|
||||
isDeleted?: boolean;
|
||||
replies?: AppReviewReply[];
|
||||
}
|
||||
|
||||
export interface FavoriteFolder {
|
||||
|
||||
Reference in New Issue
Block a user