mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-08-06 12:03:57 +08:00
chore: 暂时关闭云端同步、收藏和评论功能
调整了多个页面的相关UI和逻辑代码,注释掉并隐藏了收藏、评论以及云端同步相关的按钮和实现逻辑,同时修改了侧边栏的品牌文案展示。
This commit is contained in:
@@ -180,6 +180,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 收藏功能暂时关闭
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex w-full items-center justify-center gap-2 rounded-xl border border-slate-300 bg-white px-4 py-2.5 text-sm font-medium text-slate-600 transition hover:bg-slate-50 hover:text-slate-900 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700"
|
||||
@@ -188,6 +189,7 @@
|
||||
<i class="fas fa-star text-xs"></i>
|
||||
<span>{{ favoriteButtonText }}</span>
|
||||
</button>
|
||||
-->
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex w-full items-center justify-center gap-2 rounded-xl border border-slate-300 bg-white px-4 py-2.5 text-sm font-medium text-slate-600 transition hover:bg-slate-50 hover:text-slate-900 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700"
|
||||
@@ -336,6 +338,7 @@
|
||||
<p class="text-sm text-slate-400">暂无应用截图</p>
|
||||
</div>
|
||||
|
||||
<!-- 评论功能暂时关闭
|
||||
<ReviewsPanel
|
||||
v-if="loggedIn && activeReviewAppKey && activeReviewTags"
|
||||
:app-key="activeReviewAppKey"
|
||||
@@ -380,6 +383,7 @@
|
||||
安装应用后可发表评论。
|
||||
</p>
|
||||
</section>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -507,13 +511,14 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, useAttrs, ref, watch } from "vue";
|
||||
import axios from "axios";
|
||||
import ReviewsPanel from "@/components/ReviewsPanel.vue";
|
||||
// import ReviewsPanel from "@/components/ReviewsPanel.vue";
|
||||
import { useInstallFeedback, downloads } from "../global/downloadStatus";
|
||||
import {
|
||||
APM_STORE_BASE_URL,
|
||||
getHybridDefaultOrigin,
|
||||
} from "../global/storeConfig";
|
||||
import { buildReviewAppKey, buildReviewTags } from "../modules/appIdentity";
|
||||
// 评论功能暂时关闭
|
||||
// import { buildReviewAppKey, buildReviewTags } from "../modules/appIdentity";
|
||||
import type { App, AppReview, ReviewTags } from "../global/typedefinition";
|
||||
|
||||
const attrs = useAttrs();
|
||||
@@ -655,28 +660,29 @@ const iconPath = computed(() => {
|
||||
return `${APM_STORE_BASE_URL}/${finalArch}/${displayApp.value.category}/${displayApp.value.pkgname}/icon.png`;
|
||||
});
|
||||
|
||||
const activeReviewAppKey = computed(() => {
|
||||
if (!displayApp.value) return "";
|
||||
return buildReviewAppKey(
|
||||
displayApp.value,
|
||||
props.reviewTags?.clientArch ?? "amd64",
|
||||
);
|
||||
});
|
||||
// 评论与收藏功能暂时关闭
|
||||
// const activeReviewAppKey = computed(() => {
|
||||
// if (!displayApp.value) return "";
|
||||
// return buildReviewAppKey(
|
||||
// displayApp.value,
|
||||
// props.reviewTags?.clientArch ?? "amd64",
|
||||
// );
|
||||
// });
|
||||
|
||||
const activeReviewTags = computed<ReviewTags | null>(() => {
|
||||
if (!displayApp.value || !props.reviewTags) return null;
|
||||
return buildReviewTags(displayApp.value, {
|
||||
clientArch: props.reviewTags.clientArch,
|
||||
distro: props.reviewTags.distro,
|
||||
});
|
||||
});
|
||||
// const activeReviewTags = computed<ReviewTags | null>(() => {
|
||||
// if (!displayApp.value || !props.reviewTags) return null;
|
||||
// return buildReviewTags(displayApp.value, {
|
||||
// clientArch: props.reviewTags.clientArch,
|
||||
// distro: props.reviewTags.distro,
|
||||
// });
|
||||
// });
|
||||
|
||||
const favoriteButtonText = computed(() => {
|
||||
if (!props.favorited) return "收藏";
|
||||
return props.favoriteFolderName
|
||||
? `已收藏 · ${props.favoriteFolderName}`
|
||||
: "已收藏";
|
||||
});
|
||||
// const favoriteButtonText = computed(() => {
|
||||
// if (!props.favorited) return "收藏";
|
||||
// return props.favoriteFolderName
|
||||
// ? `已收藏 · ${props.favoriteFolderName}`
|
||||
// : "已收藏";
|
||||
// });
|
||||
|
||||
const downloadCount = ref<string>("");
|
||||
|
||||
@@ -722,14 +728,15 @@ const handleRemove = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleFavorite = () => {
|
||||
if (!displayApp.value) return;
|
||||
if (!props.loggedIn) {
|
||||
emit("request-login", "收藏应用需要登录星火账号。");
|
||||
return;
|
||||
}
|
||||
emit("favorite", displayApp.value);
|
||||
};
|
||||
// 收藏功能暂时关闭
|
||||
// const handleFavorite = () => {
|
||||
// if (!displayApp.value) return;
|
||||
// if (!props.loggedIn) {
|
||||
// emit("request-login", "收藏应用需要登录星火账号。");
|
||||
// return;
|
||||
// }
|
||||
// emit("favorite", displayApp.value);
|
||||
// };
|
||||
|
||||
const selectOrigin = (origin: "spark" | "apm") => {
|
||||
viewingOrigin.value = origin;
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
<span>卸载</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- 收藏功能暂时关闭
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex w-full items-center justify-center gap-2 rounded-xl border border-slate-300 bg-white px-4 py-2.5 text-sm font-medium text-slate-600 transition hover:bg-slate-50 hover:text-slate-900 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700"
|
||||
@@ -125,6 +126,7 @@
|
||||
<i class="fas fa-star text-xs"></i>
|
||||
<span>{{ favoriteButtonText }}</span>
|
||||
</button>
|
||||
-->
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex w-full items-center justify-center gap-2 rounded-xl border border-slate-300 bg-white px-4 py-2.5 text-sm font-medium text-slate-600 transition hover:bg-slate-50 hover:text-slate-900 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700"
|
||||
@@ -206,6 +208,7 @@
|
||||
<p v-else class="text-sm text-slate-400">暂无应用截图</p>
|
||||
</div>
|
||||
|
||||
<!-- 评论功能暂时关闭
|
||||
<ReviewsPanel
|
||||
v-if="loggedIn && reviewAppKey && reviewTags"
|
||||
:app-key="reviewAppKey"
|
||||
@@ -246,6 +249,7 @@
|
||||
安装应用后可发表评论。
|
||||
</p>
|
||||
</section>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -253,14 +257,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from "vue";
|
||||
import ReviewsPanel from "@/components/ReviewsPanel.vue";
|
||||
// import ReviewsPanel from "@/components/ReviewsPanel.vue";
|
||||
import {
|
||||
APM_STORE_BASE_URL,
|
||||
getHybridDefaultOrigin,
|
||||
} from "@/global/storeConfig";
|
||||
import {
|
||||
buildReviewAppKey,
|
||||
buildReviewTags,
|
||||
// buildReviewAppKey,
|
||||
// buildReviewTags,
|
||||
getDisplayApp,
|
||||
} from "@/modules/appIdentity";
|
||||
import type { App, AppReview, ReviewTags } from "@/global/typedefinition";
|
||||
@@ -351,28 +355,29 @@ const detailHtml = computed(
|
||||
() => displayApp.value?.more.replace(/\n/g, "<br>") ?? "",
|
||||
);
|
||||
|
||||
const reviewAppKey = computed(() => {
|
||||
if (!displayApp.value) return "";
|
||||
return buildReviewAppKey(
|
||||
displayApp.value,
|
||||
props.reviewTags?.clientArch ?? "amd64",
|
||||
);
|
||||
});
|
||||
// 评论与收藏功能暂时关闭
|
||||
// const reviewAppKey = computed(() => {
|
||||
// if (!displayApp.value) return "";
|
||||
// return buildReviewAppKey(
|
||||
// displayApp.value,
|
||||
// props.reviewTags?.clientArch ?? "amd64",
|
||||
// );
|
||||
// });
|
||||
|
||||
const reviewTags = computed<ReviewTags | null>(() => {
|
||||
if (!displayApp.value || !props.reviewTags) return null;
|
||||
return buildReviewTags(displayApp.value, {
|
||||
clientArch: props.reviewTags.clientArch,
|
||||
distro: props.reviewTags.distro,
|
||||
});
|
||||
});
|
||||
// const reviewTags = computed<ReviewTags | null>(() => {
|
||||
// if (!displayApp.value || !props.reviewTags) return null;
|
||||
// return buildReviewTags(displayApp.value, {
|
||||
// clientArch: props.reviewTags.clientArch,
|
||||
// distro: props.reviewTags.distro,
|
||||
// });
|
||||
// });
|
||||
|
||||
const favoriteButtonText = computed(() => {
|
||||
if (!props.favorited) return "收藏";
|
||||
return props.favoriteFolderName
|
||||
? `已收藏 · ${props.favoriteFolderName}`
|
||||
: "已收藏";
|
||||
});
|
||||
// const favoriteButtonText = computed(() => {
|
||||
// if (!props.favorited) return "收藏";
|
||||
// return props.favoriteFolderName
|
||||
// ? `已收藏 · ${props.favoriteFolderName}`
|
||||
// : "已收藏";
|
||||
// });
|
||||
|
||||
const selectOrigin = (origin: "spark" | "apm") => {
|
||||
viewingOrigin.value = origin;
|
||||
@@ -380,14 +385,15 @@ const selectOrigin = (origin: "spark" | "apm") => {
|
||||
if (displayApp.value) emit("check-install", displayApp.value);
|
||||
};
|
||||
|
||||
const handleFavorite = () => {
|
||||
if (!displayApp.value) return;
|
||||
if (!props.loggedIn) {
|
||||
emit("request-login", "收藏应用需要登录星火账号。");
|
||||
return;
|
||||
}
|
||||
emit("favorite", displayApp.value);
|
||||
};
|
||||
// 收藏功能暂时关闭
|
||||
// const handleFavorite = () => {
|
||||
// if (!displayApp.value) return;
|
||||
// if (!props.loggedIn) {
|
||||
// emit("request-login", "收藏应用需要登录星火账号。");
|
||||
// return;
|
||||
// }
|
||||
// emit("favorite", displayApp.value);
|
||||
// };
|
||||
|
||||
const hideImage = (event: Event) => {
|
||||
(event.target as HTMLElement).style.display = "none";
|
||||
|
||||
@@ -4,30 +4,23 @@
|
||||
<div ref="accountMenuRoot" class="relative min-w-0 flex-1">
|
||||
<button
|
||||
type="button"
|
||||
class="flex w-full min-w-0 items-center gap-3 rounded-2xl p-1 text-left transition hover:bg-slate-100 dark:hover:bg-slate-800"
|
||||
class="flex w-full min-w-0 items-center gap-2 rounded-2xl p-1 text-left transition hover:bg-slate-100 dark:hover:bg-slate-800"
|
||||
:aria-label="accountLabel"
|
||||
@click="handleAccountClick"
|
||||
>
|
||||
<img
|
||||
v-if="!currentUser || !currentUser.avatarUrl"
|
||||
:src="amberLogo"
|
||||
alt="Amber PM"
|
||||
class="h-11 w-11 rounded-2xl bg-white/70 p-2 shadow-sm ring-1 ring-slate-900/5 dark:bg-slate-800"
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
:src="currentUser.avatarUrl"
|
||||
:alt="accountLabel"
|
||||
class="h-11 w-11 rounded-2xl object-cover shadow-sm ring-1 ring-slate-900/5"
|
||||
alt="星火应用商店"
|
||||
class="h-11 w-11 shrink-0 rounded-2xl bg-white/70 p-2 shadow-sm ring-1 ring-slate-900/5 dark:bg-slate-800"
|
||||
/>
|
||||
<div data-testid="account-text" class="flex min-w-0 flex-col">
|
||||
<span
|
||||
class="truncate text-xs uppercase tracking-[0.3em] text-slate-500 dark:text-slate-400"
|
||||
>{{ currentUser ? currentUser.forumLevel : "Spark Store" }}</span
|
||||
class="truncate text-base font-semibold text-slate-900 dark:text-white"
|
||||
>{{ accountLabel }}</span
|
||||
>
|
||||
<span
|
||||
class="truncate text-lg font-semibold text-slate-900 dark:text-white"
|
||||
>{{ accountLabel }}</span
|
||||
class="truncate text-[10px] uppercase tracking-[0.2em] text-slate-400 dark:text-slate-500"
|
||||
>社区版</span
|
||||
>
|
||||
</div>
|
||||
</button>
|
||||
@@ -172,19 +165,10 @@ const emit = defineEmits<{
|
||||
const showAccountMenu = ref(false);
|
||||
const accountMenuRoot = ref<HTMLElement | null>(null);
|
||||
|
||||
const accountLabel = computed(() => {
|
||||
return props.currentUser
|
||||
? props.currentUser.displayName || props.currentUser.username
|
||||
: "登录 / 注册";
|
||||
});
|
||||
const accountLabel = computed(() => "星火应用商店");
|
||||
|
||||
const handleAccountClick = () => {
|
||||
if (!props.currentUser) {
|
||||
emit("request-login");
|
||||
return;
|
||||
}
|
||||
|
||||
showAccountMenu.value = !showAccountMenu.value;
|
||||
// 登录功能暂时关闭
|
||||
};
|
||||
|
||||
const handleDocumentPointerDown = (event: MouseEvent) => {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<!-- 云端同步功能暂时关闭
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex items-center gap-2 rounded-2xl border border-brand/30 px-4 py-2 text-sm font-semibold text-brand transition hover:bg-brand/10 disabled:opacity-40"
|
||||
@@ -45,6 +46,7 @@
|
||||
<i class="fas fa-cloud-arrow-down"></i>
|
||||
从账号恢复
|
||||
</button>
|
||||
-->
|
||||
<div
|
||||
v-if="showOriginSwitcher"
|
||||
class="flex items-center rounded-2xl border border-slate-200/70 p-1 dark:border-slate-800/70"
|
||||
@@ -248,6 +250,7 @@ const props = defineProps<{
|
||||
syncMessage: string;
|
||||
}>();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const emit = defineEmits<{
|
||||
(e: "close"): void;
|
||||
(e: "refresh"): void;
|
||||
@@ -260,23 +263,24 @@ const emit = defineEmits<{
|
||||
(e: "request-login"): void;
|
||||
}>();
|
||||
|
||||
const handleSyncClick = () => {
|
||||
if (props.loggedIn) {
|
||||
emit("sync-to-account");
|
||||
return;
|
||||
}
|
||||
// 云端同步功能暂时关闭
|
||||
// const handleSyncClick = () => {
|
||||
// if (props.loggedIn) {
|
||||
// emit("sync-to-account");
|
||||
// return;
|
||||
// }
|
||||
|
||||
emit("request-login");
|
||||
};
|
||||
// emit("request-login");
|
||||
// };
|
||||
|
||||
const handleRestoreClick = () => {
|
||||
if (props.loggedIn) {
|
||||
emit("restore-from-account");
|
||||
return;
|
||||
}
|
||||
// const handleRestoreClick = () => {
|
||||
// if (props.loggedIn) {
|
||||
// emit("restore-from-account");
|
||||
// return;
|
||||
// }
|
||||
|
||||
emit("request-login");
|
||||
};
|
||||
// emit("request-login");
|
||||
// };
|
||||
|
||||
const onOverlayWheel = (e: WheelEvent) => {
|
||||
const target = e.target as HTMLElement;
|
||||
|
||||
Reference in New Issue
Block a user