Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/api-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ Rules:
7. Providing ONLY the improved prompt, no explanations`;

prompt = `Improve the following video generation prompt and translate it to ${targetLangName}. Focus on camera movement, specific action, motion dynamics, physics, and cinematic style. Respond only with the improved prompt:\n\n${sanitizedText}`;
} else if (type === 'image-universal') {
systemInstruction = `You are an expert AI prompt engineer for image generation. Your job is to transform rough user intent into a premium, universal image prompt. These prompts should be optimized for Nano Banana Pro (Google Gemini) but must work exceptionally well with any text-to-image model including Nano Banana 2, Seedream 5.0, GPT Image 1.5, Midjourney, DALL-E 3, Flux, and Stable Diffusion. Output ONLY the final prompt in English.`;

prompt = `Turn this idea into a universal, high-quality image prompt optimized for Nano Banana but compatible with any text-to-image model. Respond only with the prompt:\n\n${sanitizedText}`;
} else {
systemInstruction = `You are a senior prompt editor for AI image models. Your task is to expand and clean up a user's existing image prompt without changing its core intent.

Expand Down
6 changes: 5 additions & 1 deletion popup/modules/ui-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export function switchMode(mode) {
export function updatePromptTypeVisuals(type) {
elements.promptTypeBtns.forEach(btn => {
if (btn.dataset.type === type) {
btn.className = 'prompt-type-btn flex-1 py-2 px-3 text-xs font-medium rounded-lg border border-orange-500/30 bg-orange-500/10 text-orange-400 flex items-center justify-center gap-2 hover:bg-orange-500/20 transition-colors';
if (type === 'image-universal') {
btn.className = 'prompt-type-btn flex-1 py-2 px-3 text-xs font-medium rounded-lg border border-green-500/30 bg-green-500/10 text-green-400 flex items-center justify-center gap-2 hover:bg-green-500/20 transition-colors';
} else {
btn.className = 'prompt-type-btn flex-1 py-2 px-3 text-xs font-medium rounded-lg border border-orange-500/30 bg-orange-500/10 text-orange-400 flex items-center justify-center gap-2 hover:bg-orange-500/20 transition-colors';
}
} else {
btn.className = 'prompt-type-btn flex-1 py-2 px-3 text-xs font-medium rounded-lg border border-gray-700 bg-[#1e1e1e] text-gray-500 flex items-center justify-center gap-2 hover:bg-[#252525] hover:text-gray-300 transition-colors';
}
Expand Down
75 changes: 61 additions & 14 deletions popup/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ video {
visibility: visible;
}

.static {
position: static;
}

.fixed {
position: fixed;
}
Expand Down Expand Up @@ -672,8 +676,8 @@ video {
margin-right: 0.25rem;
}

.mt-1 {
margin-top: 0.25rem;
.mt-2 {
margin-top: 0.5rem;
}

.mt-3 {
Expand All @@ -688,6 +692,10 @@ video {
display: block;
}

.inline {
display: inline;
}

.flex {
display: flex;
}
Expand All @@ -696,10 +704,18 @@ video {
display: grid;
}

.contents {
display: contents;
}

.hidden {
display: none;
}

.h-1 {
height: 0.25rem;
}

.h-6 {
height: 1.5rem;
}
Expand Down Expand Up @@ -1011,6 +1027,10 @@ video {
border-color: rgb(31 41 55 / 0.5);
}

.border-green-500\/30 {
border-color: rgb(34 197 94 / 0.3);
}

.border-orange-500\/20 {
border-color: rgb(249 115 22 / 0.2);
}
Expand All @@ -1019,6 +1039,10 @@ video {
border-color: rgb(249 115 22 / 0.3);
}

.border-red-900\/50 {
border-color: rgb(127 29 29 / 0.5);
}

.border-transparent {
border-color: transparent;
}
Expand Down Expand Up @@ -1068,12 +1092,13 @@ video {
background-color: rgb(0 0 0 / 0.9);
}

.bg-blue-500\/10 {
background-color: rgb(59 130 246 / 0.1);
.bg-blue-500 {
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}

.bg-blue-500\/5 {
background-color: rgb(59 130 246 / 0.05);
.bg-blue-500\/10 {
background-color: rgb(59 130 246 / 0.1);
}

.bg-blue-600 {
Expand All @@ -1086,6 +1111,15 @@ video {
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

.bg-gray-800 {
--tw-bg-opacity: 1;
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
}

.bg-green-500\/10 {
background-color: rgb(34 197 94 / 0.1);
}

.bg-orange-500\/10 {
background-color: rgb(249 115 22 / 0.1);
}
Expand All @@ -1095,6 +1129,10 @@ video {
background-color: rgb(234 88 12 / var(--tw-bg-opacity));
}

.bg-red-900\/30 {
background-color: rgb(127 29 29 / 0.3);
}

.bg-transparent {
background-color: transparent;
}
Expand Down Expand Up @@ -1248,6 +1286,10 @@ video {
text-align: center;
}

.text-right {
text-align: right;
}

.font-mono {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
Expand Down Expand Up @@ -1334,10 +1376,6 @@ video {
line-height: 1.375;
}

.tracking-\[0\.18em\] {
letter-spacing: 0.18em;
}

.tracking-\[0\.2em\] {
letter-spacing: 0.2em;
}
Expand Down Expand Up @@ -1595,15 +1633,15 @@ video {
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}

.hover\:bg-blue-500\/20:hover {
background-color: rgb(59 130 246 / 0.2);
}

.hover\:bg-gray-700:hover {
--tw-bg-opacity: 1;
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

.hover\:bg-green-500\/20:hover {
background-color: rgb(34 197 94 / 0.2);
}

.hover\:bg-orange-500\/20:hover {
background-color: rgb(249 115 22 / 0.2);
}
Expand All @@ -1612,6 +1650,10 @@ video {
background-color: rgb(239 68 68 / 0.2);
}

.hover\:bg-red-900\/60:hover {
background-color: rgb(127 29 29 / 0.6);
}

.hover\:bg-white:hover {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
Expand Down Expand Up @@ -1700,6 +1742,11 @@ video {
cursor: not-allowed;
}

.disabled\:bg-gray-700:disabled {
--tw-bg-opacity: 1;
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

.disabled\:opacity-40:disabled {
opacity: 0.4;
}
Expand Down
6 changes: 6 additions & 0 deletions popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@
data-type="image">
<i class="fa-solid fa-wand-magic-sparkles"></i> Rozbuduj
</button>
<button id="btn-p-universal"
class="prompt-type-btn flex-1 py-1.5 px-3 text-xs font-medium rounded-lg border border-gray-700 bg-[#1e1e1e] text-gray-500 flex items-center justify-center gap-2 hover:bg-[#252525] hover:text-gray-300 transition-colors"
data-type="image-universal">
<i class="fa-solid fa-globe"></i> Uniwersalny
</button>
</div>

<input type="radio" name="prompt-type" value="image-photo" class="hidden" checked>
<input type="radio" name="prompt-type" value="image-graphic" class="hidden">
<input type="radio" name="prompt-type" value="image" class="hidden">
<input type="radio" name="prompt-type" value="image-universal" class="hidden">
</div>

<!-- TONE / REGISTER SELECTOR (Translate) -->
Expand Down
Loading