feat: Add option to use profile image for AI generation.

This commit is contained in:
xds
2026-02-05 22:19:52 +03:00
parent 0e81f35560
commit ab8b69dbeb

View File

@@ -179,6 +179,7 @@ const isGenerating = ref(false)
const generationStatus = ref('') const generationStatus = ref('')
const generationProgress = ref(0) const generationProgress = ref(0)
const sendToTelegram = ref(false) const sendToTelegram = ref(false)
const useProfileImage = ref(true)
const telegramId = ref(localStorage.getItem('telegram_id') || '') const telegramId = ref(localStorage.getItem('telegram_id') || '')
const isTelegramIdSaved = ref(!!localStorage.getItem('telegram_id')) const isTelegramIdSaved = ref(!!localStorage.getItem('telegram_id'))
@@ -454,7 +455,8 @@ const handleGenerate = async () => {
quality: quality.value.key, quality: quality.value.key,
prompt: prompt.value, prompt: prompt.value,
assets_list: selectedAssets.value.map(a => a.id), assets_list: selectedAssets.value.map(a => a.id),
telegram_id: sendToTelegram.value ? telegramId.value : null telegram_id: sendToTelegram.value ? telegramId.value : null,
use_profile_image: useProfileImage.value
} }
const response = await aiService.runGeneration(payload) const response = await aiService.runGeneration(payload)
@@ -687,6 +689,13 @@ const handleLogout = () => {
<InputText v-model="telegramId" placeholder="Enter Telegram ID" <InputText v-model="telegramId" placeholder="Enter Telegram ID"
class="w-full !text-[10px] !py-1" @blur="saveTelegramId" /> class="w-full !text-[10px] !py-1" @blur="saveTelegramId" />
</div> </div>
<div class="flex items-center gap-2 mt-1">
<Checkbox v-model="useProfileImage" :binary="true"
inputId="profile-img-check" />
<label for="profile-img-check"
class="text-[10px] text-slate-400 cursor-pointer select-none">Use
Profile Photo</label>
</div>
</div> </div>
</div> </div>
@@ -858,11 +867,11 @@ const handleLogout = () => {
:totalRecords="historyTotal" @page="onHistoryPage" :template="{ :totalRecords="historyTotal" @page="onHistoryPage" :template="{
default: 'PrevPageLink PageLinks NextPageLink' default: 'PrevPageLink PageLinks NextPageLink'
}" class="!bg-transparent !border-none !p-0 !text-[10px]" :pt="{ }" class="!bg-transparent !border-none !p-0 !text-[10px]" :pt="{
root: { class: '!p-0' }, root: { class: '!p-0' },
pcPageButton: { root: ({ context }) => ({ class: ['!min-w-[24px] !h-6 !text-[10px] !rounded-md', context.active ? '!bg-violet-600/20 !text-violet-400' : '!bg-transparent'] }) }, pcPageButton: { root: ({ context }) => ({ class: ['!min-w-[24px] !h-6 !text-[10px] !rounded-md', context.active ? '!bg-violet-600/20 !text-violet-400' : '!bg-transparent'] }) },
pcNextPageButton: { root: { class: '!min-w-[24px] !h-6 !text-[10px]' } }, pcNextPageButton: { root: { class: '!min-w-[24px] !h-6 !text-[10px]' } },
pcPreviousPageButton: { root: { class: '!min-w-[24px] !h-6 !text-[10px]' } } pcPreviousPageButton: { root: { class: '!min-w-[24px] !h-6 !text-[10px]' } }
}" /> }" />
</div> </div>
</div> </div>
</div> </div>
@@ -950,20 +959,20 @@ const handleLogout = () => {
:totalRecords="assetsTotalRecords" @page="onAssetsPage" :template="{ :totalRecords="assetsTotalRecords" @page="onAssetsPage" :template="{
default: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink' default: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink'
}" class="!bg-transparent !border-none !p-0" :pt="{ }" class="!bg-transparent !border-none !p-0" :pt="{
root: { class: '!bg-transparent' }, root: { class: '!bg-transparent' },
pcPageButton: { pcPageButton: {
root: ({ context }) => ({ root: ({ context }) => ({
class: [ class: [
'!min-w-[40px] !h-10 !rounded-xl !border-none !transition-all !duration-300 !font-bold', '!min-w-[40px] !h-10 !rounded-xl !border-none !transition-all !duration-300 !font-bold',
context.active ? '!bg-violet-600 !text-white !shadow-lg' : '!bg-white/5 !text-slate-400 hover:!bg-white/10 hover:!text-slate-50' context.active ? '!bg-violet-600 !text-white !shadow-lg' : '!bg-white/5 !text-slate-400 hover:!bg-white/10 hover:!text-slate-50'
] ]
}) })
}, },
pcFirstPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } }, pcFirstPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } },
pcPreviousPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } }, pcPreviousPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } },
pcNextPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } }, pcNextPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } },
pcLastPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } } pcLastPageButton: { root: { class: '!bg-white/5 !text-slate-400 !border-none !rounded-xl !min-w-[40px] !h-10 hover:!bg-white/10 hover:!text-slate-50 transition-all' } }
}" /> }" />
</div> </div>
</div> </div>
</div> </div>