diff --git a/src/views/FlexibleGenerationView.vue b/src/views/FlexibleGenerationView.vue
index 65ae666..39a4b00 100644
--- a/src/views/FlexibleGenerationView.vue
+++ b/src/views/FlexibleGenerationView.vue
@@ -152,7 +152,7 @@ const modalAssets = ref([])
const isModalLoading = ref(false)
const tempSelectedAssets = ref([])
const quality = ref({ key: 'TWOK', value: '2K' })
-const aspectRatio = ref({ key: "NINESIXTEEN", value: "9:16" })
+const aspectRatio = ref('NINESIXTEEN') // Default to Video (9:16)
const generationCount = ref(1)
const sendToTelegram = ref(false)
const telegramId = ref('')
@@ -218,18 +218,6 @@ const qualityOptions = ref([
{ key: 'TWOK', value: '2K' },
{ key: 'FOURK', value: '4K' }
])
-const aspectRatioOptions = ref([
- { key: "ONEONE", value: "1:1" },
- { key: "TWOTHREE", value: "2:3" },
- { key: "THREETWO", value: "3:2" },
- { key: "THREEFOUR", value: "3:4" },
- { key: "FOURTHREE", value: "4:3" },
- { key: "FOURFIVE", value: "4:5" },
- { key: "FIVEFOUR", value: "5:4" },
- { key: "NINESIXTEEN", value: "9:16" },
- { key: "SIXTEENNINE", value: "16:9" },
- { key: "TWENTYONENINE", value: "21:9" }
-])
// --- Persistence ---
const STORAGE_KEY = 'flexible_gen_settings'
@@ -267,7 +255,14 @@ const restoreSettings = () => {
// We need characters and assets loaded to fully restore objects
// For now, we'll store IDs and restore in loadData
if (settings.quality) quality.value = settings.quality
- if (settings.aspectRatio) aspectRatio.value = settings.aspectRatio
+ if (settings.aspectRatio) {
+ // Handle legacy object format if present
+ if (typeof settings.aspectRatio === 'object' && settings.aspectRatio.key) {
+ aspectRatio.value = settings.aspectRatio.key
+ } else {
+ aspectRatio.value = settings.aspectRatio
+ }
+ }
sendToTelegram.value = settings.sendToTelegram || false
telegramId.value = settings.telegramId || localStorage.getItem('telegram_id') || ''
if (telegramId.value) isTelegramIdSaved.value = true
@@ -429,7 +424,7 @@ const handleGenerate = async () => {
try {
const payload = {
- aspect_ratio: aspectRatio.value.key,
+ aspect_ratio: aspectRatio.value, // Now a string
quality: quality.value.key,
prompt: prompt.value,
assets_list: selectedAssets.value.map(a => a.id),
@@ -1159,11 +1154,22 @@ const confirmAddToAlbum = async () => {
:pt="{ input: { class: '!text-white' }, trigger: { class: '!text-slate-400' }, panel: { class: '!bg-slate-800 !border-white/10' }, item: { class: '!text-slate-300 hover:!bg-white/10 hover:!text-white' } }" />
-
-
+
+
+
+
+
+
+
+
diff --git a/src/views/IdeaDetailView.vue b/src/views/IdeaDetailView.vue
index 21292db..3782132 100644
--- a/src/views/IdeaDetailView.vue
+++ b/src/views/IdeaDetailView.vue
@@ -89,7 +89,7 @@ const showAssetPicker = ref(false) // Deprecated, using isAssetPickerVisible
// --- Load saved settings from localStorage ---
const SETTINGS_KEY = 'idea-gen-settings'
const quality = ref({ key: 'TWOK', value: '2K' })
-const aspectRatio = ref({ key: 'NINESIXTEEN', value: '9:16' })
+const aspectRatio = ref('NINESIXTEEN') // Default to Video (9:16)
const imageCount = ref(1)
const sendToTelegram = ref(false)
const telegramId = ref('')
@@ -160,7 +160,14 @@ const restoreSettings = () => {
const s = JSON.parse(stored)
if (s.prompt) prompt.value = s.prompt
if (s.quality) quality.value = s.quality
- if (s.aspectRatio) aspectRatio.value = s.aspectRatio
+ if (s.aspectRatio) {
+ // Handle legacy object format if present
+ if (typeof s.aspectRatio === 'object' && s.aspectRatio.key) {
+ aspectRatio.value = s.aspectRatio.key
+ } else {
+ aspectRatio.value = s.aspectRatio
+ }
+ }
if (s.imageCount) imageCount.value = Math.min(s.imageCount, 4)
if (s.selectedModel) selectedModel.value = s.selectedModel
sendToTelegram.value = s.sendToTelegram || false
@@ -200,18 +207,6 @@ const qualityOptions = ref([
{ key: 'TWOK', value: '2K' },
{ key: 'FOURK', value: '4K' }
])
-const aspectRatioOptions = ref([
- { key: "ONEONE", value: "1:1" },
- { key: "TWOTHREE", value: "2:3" },
- { key: "THREETWO", value: "3:2" },
- { key: "THREEFOUR", value: "3:4" },
- { key: "FOURTHREE", value: "4:3" },
- { key: "FOURFIVE", value: "4:5" },
- { key: "FIVEFOUR", value: "5:4" },
- { key: "NINESIXTEEN", value: "9:16" },
- { key: "SIXTEENNINE", value: "16:9" },
- { key: "TWENTYONENINE", value: "21:9" }
-])
// Removed duplicate characters ref
const loadingGenerations = ref(false) // Added this ref based on usage in fetchGenerations
@@ -312,7 +307,7 @@ const handleGenerate = async () => {
// Construct Payload
const payload = {
prompt: prompt.value,
- aspect_ratio: aspectRatio.value.key,
+ aspect_ratio: aspectRatio.value, // Now a string
quality: quality.value.key,
assets_list: selectedAssets.value.map(a => a.id),
linked_character_id: selectedCharacter.value?.id || selectedCharacter.value?._id || null,
@@ -1373,7 +1368,7 @@ watch(viewMode, (v) => {
class="flex-shrink-0 flex items-center gap-2 px-2 py-1.5 rounded-lg border-2 transition-all cursor-pointer group bg-slate-800/40"
:class="[
(selectedEnvironment?.id === (env.id || env._id) || selectedEnvironment?._id === (env.id || env._id))
- ? 'border-violet-500 bg-violet-500/10 shadow-[0_0_15px_rgba(124,58,237,0.15)]'
+ ? 'border-violet-500 bg-violet-500/10 shadow-[0_0_15px_rgba(124,58,237,0.1)]'
: 'border-white/5 hover:border-white/20'
]"
>
@@ -1411,10 +1406,22 @@ watch(viewMode, (v) => {
-
+ class="text-[10px] font-bold text-slate-400 uppercase tracking-wider">Format
+
+
+
+
+
+
+