This commit is contained in:
xds
2026-02-24 12:47:19 +03:00
parent a1d37ac517
commit 122c5a7cbc
5 changed files with 38 additions and 7 deletions

View File

@@ -175,6 +175,7 @@ restoreSettings()
watch([prompt, quality, aspectRatio, imageCount, selectedModel, sendToTelegram, telegramId, useProfileImage, useEnvironment, selectedCharacter, selectedEnvironment, selectedAssets], saveSettings, { deep: true })
const viewMode = ref('feed') // 'feed' or 'gallery'
const onlyLiked = ref(false)
const isSubmitting = ref(false)
const isSettingsVisible = ref(localStorage.getItem('idea_detail_settings_visible') !== 'false')
@@ -255,7 +256,7 @@ const loadCharacters = async () => {
const fetchGenerations = async (ideaId) => {
loadingGenerations.value = true
try {
const response = await ideaStore.fetchIdeaGenerations(ideaId, 100)
const response = await ideaStore.fetchIdeaGenerations(ideaId, 100, onlyLiked.value)
let loadedGens = []
if (response.data && response.data.generations) {
loadedGens = response.data.generations
@@ -914,6 +915,12 @@ const toggleLike = async (gen) => {
}
}
watch(onlyLiked, (newVal) => {
if (currentIdea.value) {
fetchGenerations(currentIdea.value.id)
}
})
// Exit select mode when switching to feed
watch(viewMode, (v) => {
if (v !== 'gallery') {
@@ -969,6 +976,12 @@ watch(viewMode, (v) => {
</button>
</div>
<Button :icon="onlyLiked ? 'pi pi-heart-fill' : 'pi pi-heart'"
@click="onlyLiked = !onlyLiked" rounded text
class="!w-7 !h-7 !p-0"
:class="onlyLiked ? '!text-pink-500 !bg-pink-500/10' : '!text-slate-400 hover:!bg-white/10'"
v-tooltip.bottom="onlyLiked ? 'Show all' : 'Show liked only'" />
<Button icon="pi pi-trash" text rounded severity="danger" size="small"
class="!w-7 !h-7"
v-tooltip.bottom="'Delete Idea'"